{"openapi":"3.1.0","info":{"title":"Antero Connect API","version":"1.0.0","summary":"Channel manager API.","description":"Antero Connect is a channel manager. You tell it how many rooms are free and at what price, and it keeps every booking channel in step; when a guest\nbooks, it tells you. This is the reference for every operation. **The [developer guide](/docs/overview.html) explains how the parts fit\ntogether**, with a [quickstart](/docs/quickstart.html) that ends with a booking taken and read back, and a\n[complete hotel-system loop](/docs/pms-integration.html) that is tested against a real server.\n\n**Authentication.** Send your API key as `Authorization: Bearer <key>`. A key carries scopes (`read:catalog`, `write:catalog`, ...);\n`write:x` does not imply `read:x`. A key can be limited to specific properties; other properties then behave as if they do not exist (404).\nEach operation names the scope it needs. See [Authentication](/docs/authentication.html).\n\n**Errors.** Every error has the same shape, `{\"error\": {\"code\", \"message\", \"request_id\"}}`. `code` is stable and meant for programs;\n`message` is for people and may change. Every code is listed in [Errors](/docs/errors.html).\n\n**Idempotency.** Send an `Idempotency-Key` header on every POST, PUT and PATCH. Repeating a request with the same key and the same body returns\nthe original response; the same key with a different body is a 409.\n\n**Pagination.** Lists accept `limit` (default 50, max 200) and `after` (the `next_cursor` of the previous page). `next_cursor` is `null` on the last page.\n\n**Money and dates.** Money is an integer in the smallest unit of an ISO 4217 currency (US$120.00 is `12000`; JPY has no decimals). A night is a\nplain date in the property's time zone; ranges include both ends (`date_to` is included). Instants are RFC 3339 in UTC.\n\n**Compatibility.** Within `/v1` Antero Connect only adds. Your code must ignore fields it does not know. See the [changelog](/docs/changelog.html).\n","license":{"name":"Proprietary","identifier":"LicenseRef-Proprietary"}},"servers":[{"url":"https://{host}","description":"Production. `host` is the address of your Antero Connect service.","variables":{"host":{"default":"api.anteromas.com"}}},{"url":"http://192.168.88.3:8090","description":"The test server (this is where new versions are tried first)."},{"url":"http://localhost:8080","description":"Local development"}],"externalDocs":{"description":"The developer guide (quickstart, concepts, a tested hotel-system loop, webhooks, errors, FAQ)","url":"/docs/"},"security":[{"bearerAuth":[]}],"tags":[{"name":"Meta","description":"Is the service up, and who am I. `GET /v1/whoami` is the first call to make with a new key: it shows the organization, the scopes and the properties the key may use."},{"name":"Signing in","description":"Sign-in for people, not for programs (programs use API keys). A person signs in with a link sent by email or with a password and gets a session token, which the panel uses like an API key. Organizations are created and chosen here."},{"name":"Team","description":"The people of an organization and the invitations that bring more. Only an owner or an admin may change them."},{"name":"Support","description":"Support tickets: a person of a hotel writes to us and reads our answers. Any role may write; an API key may not. A ticket carries a snapshot of the hotel's technical state taken when it is opened (plan, channel connections and their health), never guest or booking data. We answer as soon as we can; there is no promised time. A hotel whose account is locked for lack of credit can still use these calls."},{"name":"Billing","description":"The plan an organization is on, the days left of its free trial, and what it uses. Nothing is charged and nothing is blocked when a trial ends; this only says where the organization stands."},{"name":"API keys","description":"Create and revoke the keys programs use. A key carries scopes (what it may do) and may be limited to some properties. The secret is shown once, at creation."},{"name":"Setup","description":"Helpers that tell a hotel how far it has got (`setup`), how its own software is doing (`pms-link`), and one reading of everything a calendar needs (`calendar`)."},{"name":"Properties","description":"A property is a hotel, villa or other place that sells rooms. Everything else hangs off one. `authority_mode` says who counts the rooms; read the guide on availability before changing it."},{"name":"Room types","description":"What a property sells (Deluxe, Standard). `total_units` is how many rooms of the type exist; availability is a number between 0 and that."},{"name":"Rate plans","description":"How a room type is priced and sold. A plan is a base price per night or is derived from another plan by a rule. Prices and restrictions are set per plan per day."},{"name":"Availability and rates","description":"The heart of the API. Push how many rooms are free (`availability`), at what price (`rates`) and under what restrictions (`restrictions`). Every write can be tried first with `dry_run=true`, and `explain` says why a number is what it is."},{"name":"Reservations","description":"Bookings of all origins in one place, from channels, from the hotel's own software, from the booking page, or made by hand. The numbered feed is how a hotel system learns about new and changed bookings without missing one."},{"name":"Channels","description":"Connections to booking channels (OTAs): create, test, map rooms and rates, switch on, and watch the state of each day sent. Everything a channel needs is hidden behind the same few calls."},{"name":"Closures","description":"Close a room type for some days at one OTA or at all of them, and see whether the channel really did it. A closure that cannot be done at one OTA says so and offers alternatives."},{"name":"Channel messages","description":"What channels send to Antero Connect. A channel posts reservations to a webhook address; the raw message is kept (cards removed) and turned into a reservation. Used by people connecting a channel, not by hotel software."},{"name":"Decisions","description":"Things that need a person. A decision appears by itself (a booking that cannot be placed, a channel that stopped answering) and closes by itself when the cause goes away."},{"name":"Monitoring","description":"One verdict per property, computed now: is it alive, is anything stuck, what needs attention. The same verdict drives alerts."},{"name":"Webhooks","description":"Antero Connect tells your system that something changed, by an HTTPS call signed with HMAC. The call carries no data to trust: it is a nudge, and the numbered feed is the truth. Failed calls are retried, then parked and can be replayed."},{"name":"Payments","description":"Online payment through the hotel's own payment gateway account (each country has its own gateways). The guest pays on the gateway's hosted page and the money goes straight to the hotel's account: Antero Connect never holds it and never sees a card. Connect a gateway, make a payment link for a reservation, and the gateway tells Antero Connect, signed, when it was paid."},{"name":"Booking engine","description":"The public booking page (\"Direct\") and its settings. The settings need a key; the guest-facing calls need none and are held to limits per address."}],"x-tagGroups":[{"name":"Getting started","tags":["Meta","Signing in","API keys"]},{"name":"Your hotel","tags":["Properties","Room types","Rate plans","Availability and rates","Reservations"]},{"name":"Distribution","tags":["Channels","Closures","Channel messages"]},{"name":"Running it","tags":["Decisions","Monitoring","Webhooks"]},{"name":"Organization","tags":["Team","Setup"]},{"name":"Direct","tags":["Booking engine"]}],"paths":{"/healthz":{"get":{"tags":["Meta"],"operationId":"getHealth","summary":"Liveness check","description":"No authentication. Answers `200 {\"status\":\"ok\"}` while the service can take requests. Use it for a load balancer or an uptime check. It does not prove the database is reachable: use `/readyz` for that.\n","security":[],"responses":{"200":{"description":"The service is up.","content":{"application/json":{"schema":{"type":"object","required":["status"],"properties":{"status":{"type":"string","const":"ok"}}}}}}}}},"/readyz":{"get":{"tags":["Meta"],"operationId":"getReady","summary":"Readiness check","description":"No authentication. Answers `200 {\"status\":\"ready\"}` when the service can do its work, that is when its database answers within two seconds, and `503 {\"status\":\"unavailable\",\"failed\":[\"database\"]}` when it\ncannot. `/healthz` stays `ok` while the database is down; this one does not. Point an uptime monitor at it, once a minute, and raise the alarm on two failures in a row.\n","security":[],"responses":{"200":{"description":"The service is ready.","content":{"application/json":{"schema":{"type":"object","required":["status"],"properties":{"status":{"type":"string","const":"ready"}}}}}},"503":{"description":"The database does not answer.","content":{"application/json":{"schema":{"type":"object","required":["status","failed"],"properties":{"status":{"type":"string","const":"unavailable"},"failed":{"type":"array","items":{"type":"string","enum":["database"]}}}}}}}}}},"/v1/whoami":{"get":{"tags":["Meta"],"operationId":"whoami","summary":"Show which organization and scopes the API key carries","description":"Needs any valid key. Shows the organization the key belongs to, the scopes it carries and the properties it is limited to (empty means every property). Call it first with a new key: a `403 insufficient_scope` later is almost always a scope missing here.\n","responses":{"200":{"description":"The key's identity.","content":{"application/json":{"example":{"key_id":"c1647eea-2b59-55b9-a711-f99041afc556","property_ids":[],"scopes":["read:catalog","write:catalog"],"tenant_id":"52c648af-f51e-5637-9409-9d2a57c30ad6"},"schema":{"type":"object","required":["tenant_id","key_id","scopes","property_ids"],"properties":{"tenant_id":{"type":"string","format":"uuid"},"key_id":{"type":"string","format":"uuid"},"scopes":{"type":"array","items":{"type":"string"}},"property_ids":{"type":"array","description":"Empty means every property of the organization.","items":{"type":"string","format":"uuid"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/v1/api-keys":{"get":{"tags":["API keys"],"operationId":"listApiKeys","summary":"List the organization's API keys","description":"For a **person signed in as owner or admin** (a key cannot manage keys). Active keys first. A key is never shown again after it was\nmade; only its prefix (the part that identifies it). `valid_scopes` lists what a key can carry.\n","responses":{"200":{"description":"The keys.","content":{"application/json":{"schema":{"type":"object","required":["data","valid_scopes"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ApiKey"}},"valid_scopes":{"type":"array","items":{"type":"string"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"}}},"post":{"tags":["API keys"],"operationId":"createApiKey","summary":"Make an API key","description":"For a person signed in as owner or admin. The answer carries the whole `key` **once**; keep it, it cannot be read again.\nA key can only carry permissions the person who makes it has. Say which properties it is for: `property_ids` (a list), or `all_properties: true` for every property of the organization. Neither, an empty list, or both is `400`.\n","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","scopes"],"properties":{"name":{"type":"string","minLength":1,"maxLength":100},"scopes":{"type":"array","minItems":1,"items":{"type":"string"}},"property_ids":{"type":"array","items":{"type":"string","format":"uuid"}},"all_properties":{"type":"boolean","description":"True: the key may use every property of the organization. Give this or a non-empty property_ids, not both."}}}}}},"responses":{"201":{"description":"The key, with its whole text this once.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/api-keys/{id}":{"parameters":[{"$ref":"#/components/parameters/Id"}],"delete":{"tags":["API keys"],"operationId":"revokeApiKey","summary":"Revoke an API key","description":"For a person signed in as owner or admin. A revoked key stops working at once and stays in the list as revoked.","responses":{"200":{"description":"The key, now revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKey"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/members":{"get":{"tags":["Team"],"operationId":"listMembers","summary":"List the team and the open invitations","description":"For a **person signed in as owner or admin**. `assignable_roles` is what the caller may give: an owner any role, an admin only\nstaff and readonly.\n","responses":{"200":{"description":"The members, the open invitations and the roles the caller may give.","content":{"application/json":{"schema":{"type":"object","required":["data","invitations","assignable_roles"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Member"}},"invitations":{"type":"array","items":{"$ref":"#/components/schemas/Invitation"}},"assignable_roles":{"type":"array","items":{"type":"string","enum":["owner","admin","staff","readonly"]}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"}}}},"/v1/account":{"get":{"tags":["Billing"],"operationId":"getAccount","summary":"See whether the account is closed","description":"For a **person signed in**, in any role. Works while the account is closed or locked. `closed` is true after an owner closed the account (or it was closed for inactivity); `closed_at` and\n`purge_after` say when, and when the data is deleted for good (30 days after closing). `days_left` counts the days to that. `terms_version` is the version of the terms in force.\n","responses":{"200":{"description":"The closing state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"}}}},"/v1/account/close":{"post":{"tags":["Billing"],"operationId":"closeAccount","summary":"Close the account (owner)","description":"Only an **owner** signed in. The body must carry the name of the organization exactly (`confirm_name`, capitals and surrounding spaces do not matter), or the answer is `400 confirm_mismatch`.\nFrom then on the account is read-only (every change answers `403 account_closed`; reading and exporting work), nothing is charged, every channel is told 0 rooms, and the public booking page\ntakes no bookings. The data is deleted for good after 30 days; until then `POST /v1/account/reopen` undoes this. `409 already_closed` when it was closed already.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["confirm_name"],"properties":{"confirm_name":{"type":"string","description":"The name of the organization","typed to confirm.":null}}}}}},"responses":{"200":{"description":"Closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}}},"400":{"description":"confirm_mismatch."},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"description":"forbidden_role or session_required."},"409":{"description":"already_closed."}}}},"/v1/account/reopen":{"post":{"tags":["Billing"],"operationId":"reopenAccount","summary":"Reopen a closed account (owner)","description":"Only an **owner** signed in. Opens the account again, with its data, while the data is still there; every channel is sent its rooms again. `409 not_closed` when there is nothing to reopen or the data was already deleted.","responses":{"200":{"description":"Open again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"description":"forbidden_role or session_required."},"409":{"description":"not_closed."}}}},"/v1/billing":{"get":{"tags":["Billing"],"operationId":"getBilling","summary":"See the plan, the balance and where the account stands","description":"For a **person signed in** (a session; a key gets `403 session_required`), in any role. Works while the account is locked.\n\n`status` is where the organization stands: `trial` (free; nothing is charged), `active`, `grace` (the balance went below zero after a charge; it is locked on `grace_ends_at`\nunless credit arrives) or `locked` (only billing and sign-in work; everything else answers `402 payment_required`). `trial_state` is `trial` while the free trial runs and `ended` after;\n`trial_days_left` counts a day that has begun.\n\nThe account is prepaid. Amounts are whole minor units of `currency`. A fee is worked out each day from the rooms the organization has (`rooms`: the units of its active room types) and the price\nof its tier (`monthly_price`; `tier_max_rooms` is the tier, 0 when there is none); on the 1st of a month the fees of the month before are taken from `balance` in one charge (`next_charge_on`).\n`accrued_not_charged` is what has built up this month. `quote_required` means more rooms than the largest tier: the price is agreed with the organization. `price_missing` means no price is set\nfor the plan and currency, so nothing is charged yet.\n","responses":{"200":{"description":"Where the organization stands.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Billing"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"}}}},"/v1/billing/statement":{"get":{"tags":["Billing"],"operationId":"getBillingStatement","summary":"See the account statement","description":"For a **person signed in**. The ledger, newest first, with the balance after each line. A line is a `topup` (credit), a `charge` (the month's fees, a debit with its `period`), an `adjustment` or a `credit`\n(a gift). The ledger is only ever added to. Works while the account is locked.\n","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}}],"responses":{"200":{"description":"The statement.","content":{"application/json":{"schema":{"type":"object","required":["currency","balance","lines"],"properties":{"currency":{"type":"string"},"balance":{"type":"integer","format":"int64"},"lines":{"type":"array","items":{"$ref":"#/components/schemas/BillingLine"}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"}}}},"/v1/billing/topups":{"post":{"tags":["Billing"],"operationId":"createBillingTopup","summary":"Add credit with a payment provider (rupiah)","description":"For an **owner or admin signed in**. Asks the provider (`duitku` or `doku`; left out, the first one this server has: see `payment_providers` of `GET /v1/billing`) for a payment of `amount` (Rp 10.000 to Rp 100.000.000; in hundredths, see below) and returns the provider's page to send the person to (`payment_url`). The balance\ndoes **not** move now: it moves when the provider's signed notification says the money came (see `GET /v1/billing/topups/{order}` to ask whether it has). Online payment takes rupiah only,\nso an account billed in another currency gets `409 payment_currency`; a server with no provider set up answers `503 payments_unavailable`, and a provider it does not have is a 400. Works while the account is locked.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["amount"],"properties":{"amount":{"type":"integer","format":"int64","minimum":1000000,"maximum":10000000000,"description":"In the smallest unit like every amount of the API: the rupiah counts hundredths, so Rp 250.000 is `25000000`. A whole number of rupiah (a multiple of 100)."},"provider":{"type":"string","enum":["duitku","doku"],"description":"The payment provider. Default the first one the server has."}}}}}},"responses":{"201":{"description":"The invoice was made.","content":{"application/json":{"schema":{"type":"object","required":["order_id","amount","currency","payment_url","expires_in_minutes"],"properties":{"order_id":{"type":"string","description":"The order to ask about afterwards."},"provider":{"type":"string","enum":["duitku","doku"]},"amount":{"type":"integer","format":"int64"},"currency":{"type":"string","example":"IDR"},"payment_url":{"type":"string","format":"uri"},"expires_in_minutes":{"type":"integer"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"409":{"description":"The account is not billed in rupiah (`payment_currency`)."},"502":{"description":"The payment provider did not accept the request (`payment_provider_error`)."},"503":{"description":"Online payment is not set up on this server (`payments_unavailable`)."}}}},"/v1/billing/topups/{order}":{"get":{"tags":["Billing"],"operationId":"getBillingTopup","summary":"Has a top-up been paid?","description":"For a person signed in. `paid` once the ledger has the line that the provider's signed notification caused, `pending` until then. A DOKU order that is still pending a minute after it was made is also asked about at DOKU (at most once every 20 seconds), so a notification that is late or never came does not leave a paid order unpaid: it is credited then, once, and only for the amount that was asked. Another organization's order is a 404.\n","parameters":[{"name":"order","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Where the top-up stands.","content":{"application/json":{"schema":{"type":"object","required":["order_id","status"],"properties":{"order_id":{"type":"string"},"status":{"type":"string","enum":["pending","paid"]},"amount":{"type":"integer","format":"int64","description":"Present when paid."},"paid_at":{"type":"string","format":"date-time","description":"Present when paid."},"created_at":{"type":"string","format":"date-time","description":"When a DOKU order was made (not present for a Duitku order)."}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/billing/daily-fees":{"get":{"tags":["Billing"],"operationId":"getBillingDailyFees","summary":"See the fee of each day of a month","description":"For a **person signed in**. The daily fees of a month (default: this month), oldest first. A day's fee is the month's price spread over its days; the charge on the 1st is the sum of them. Days\nare UTC days. Works while the account is locked. The days of the free trial are listed too, with `waived: \"trial\"`: they show what the day would cost and are not charged.\n","parameters":[{"name":"month","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9]{4}-[0-9]{2}$","examples":["2026-11"]}}],"responses":{"200":{"description":"The days.","content":{"application/json":{"schema":{"type":"object","required":["month","days"],"properties":{"month":{"type":"string"},"days":{"type":"array","items":{"type":"object","required":["day","plan","rooms","monthly","amount","currency"],"properties":{"day":{"type":"string","format":"date"},"plan":{"type":"string"},"rooms":{"type":"integer"},"monthly":{"type":"integer","format":"int64"},"amount":{"type":"integer","format":"int64"},"currency":{"type":"string"},"waived":{"type":"string","enum":["trial"],"description":"Present when the day is shown but not charged."}}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"}}}},"/v1/billing/plan":{"put":{"tags":["Billing"],"operationId":"changePlan","summary":"Choose the plan","description":"For a **person signed in as owner** (a session); anyone else gets `403 forbidden_role`. An owner switches between `light` (the front desk) and `connect` (Light and the channel manager, with the panel and the booking page) at any time;\nwhat is charged follows the plan from the next day's fee, and the days already used keep their price. `max` (the full hotel system) is a different system and is reached only by migration: asking for it here is\n`409 plan_max_by_migration` (use `POST /v1/billing/max-request`), and an account that is on it cannot go back (`409 plan_one_way`). `light` has no API, so it is refused with `409 plan_api_in_use` while a property's room count is run by the hotel software or an API key is active.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["plan"],"properties":{"plan":{"type":"string","enum":["light","connect"]}}}}}},"responses":{"200":{"description":"Where the organization stands now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Billing"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"409":{"description":"`plan_max_by_migration`, `plan_one_way` or `plan_api_in_use`."}}}},"/v1/support/tickets":{"get":{"tags":["Support"],"operationId":"listTickets","summary":"The tickets of this organization","description":"For a person signed in. Newest activity first, at most 100. `status=open` leaves out the solved and closed ones.","parameters":[{"name":"status","in":"query","schema":{"type":"string","enum":["open","all"]}}],"responses":{"200":{"description":"The tickets, without their messages.","content":{"application/json":{"schema":{"type":"object","required":["tickets"],"properties":{"tickets":{"type":"array","items":{"$ref":"#/components/schemas/Ticket"}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"}}},"post":{"tags":["Support"],"operationId":"createTicket","summary":"Write to support","description":"For a person signed in, in any role. The ticket gets a number (`T-1042`) and carries a snapshot of the technical state (`context`). `blocking: true` says the problem stops the hotel's bookings and raises the priority.\nAt most 10 new tickets an hour per organization (`429 too_many_tickets`): add to an open ticket instead.\n","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["subject","body","category"],"properties":{"subject":{"type":"string","minLength":1,"maxLength":200},"body":{"type":"string","minLength":1,"maxLength":10000},"category":{"type":"string","enum":["channel","availability","bookings","billing","other"]},"property_id":{"type":"string","format":"uuid","description":"The property it is about; the snapshot then covers its connections only."},"blocking":{"type":"boolean"}}}}}},"responses":{"201":{"description":"The ticket, with its first message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ticket"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"429":{"description":"`too_many_tickets`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/support/tickets/{id}":{"get":{"tags":["Support"],"operationId":"getTicket","summary":"One ticket with its messages","description":"For a person signed in. Our internal notes are never in `messages`.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The ticket.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ticket"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/support/tickets/{id}/messages":{"post":{"tags":["Support"],"operationId":"replyTicket","summary":"Add to a ticket","description":"For a person signed in. A reply opens a solved ticket again for 14 days after it was solved; after that, and for a closed ticket, the answer is `409 ticket_closed` (write a new ticket).\n","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["body"],"properties":{"body":{"type":"string","minLength":1,"maxLength":10000}}}}}},"responses":{"201":{"description":"The ticket with the new message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ticket"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"`ticket_closed`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/support/tickets/{id}/solved":{"post":{"tags":["Support"],"operationId":"markTicketSolved","summary":"Say that it is solved","description":"For a person signed in. A solved ticket opens again by a reply for 14 days. Saying it twice is the same as once.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The ticket.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ticket"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/support/messages/{id}/attachments":{"post":{"tags":["Support"],"operationId":"addTicketAttachment","summary":"Put a picture on a message","description":"For the person who wrote the message. The request body is the picture itself (JPEG, PNG or WebP, at most 1.5 MB; the panel shrinks a screenshot first). A message takes at most 3 pictures (`409 attachment_limit`).\nA message of somebody else's, or one that does not exist, is `404`.\n","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"image/jpeg":{"schema":{"type":"string","format":"binary"}},"image/png":{"schema":{"type":"string","format":"binary"}},"image/webp":{"schema":{"type":"string","format":"binary"}}}},"responses":{"201":{"description":"The picture is kept.","content":{"application/json":{"schema":{"type":"object","required":["id","content_type","bytes"],"properties":{"id":{"type":"string","format":"uuid"},"content_type":{"type":"string"},"bytes":{"type":"integer"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"`attachment_limit`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"`payload_too_large`: the picture is bigger than 1.5 MB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/support/attachments/{id}":{"get":{"tags":["Support"],"operationId":"getTicketAttachment","summary":"A picture of a ticket","description":"For a person of the organization the ticket belongs to. The answer is the picture itself.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The picture.","content":{"image/jpeg":{"schema":{"type":"string","format":"binary"}},"image/png":{"schema":{"type":"string","format":"binary"}},"image/webp":{"schema":{"type":"string","format":"binary"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/billing/max-request":{"post":{"tags":["Billing"],"operationId":"requestMax","summary":"Ask to migrate to Antero Max","description":"For a person signed in as owner. Antero Max is a different system from Light and Connect: the hotel's data is moved to it once, and there is no way back. This records the request (with an optional note); we start the\nmigration and agree a date with the owner. Asking twice is the same as once. `409 already_max` when the account is on Max already. The answer is the billing state, whose `max_request` says that a request is open.\n","requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"note":{"type":"string","maxLength":1000}}}}}},"responses":{"200":{"description":"Where the organization stands now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Billing"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"409":{"description":"`already_max`."}}}},"/v1/properties/{id}/imports/inspect":{"post":{"tags":["Reservations"],"operationId":"inspectImport","summary":"Read a file of reservations from another system","description":"Needs `write:reservations`. Send the file (a **CSV** or an Excel **.xlsx**; the old `.xls` must be saved as one of these) as `multipart/form-data` in the field `file`. Optional fields: `sheet` (a\nsheet name) and `header_row` (1-based; default: the first row with at least two filled cells). Nothing is saved.\n\nThe answer is what a screen needs to let a person say which column is what: the sheets, every column with a few values (and every different value when there are few, so a status or a room type can be\nmatched), and guesses: `mapping` (field to column index, from the headers, in English and Indonesian), `date_format` (`dmy`, `mdy` or `ymd`; `date_ambiguous` is true when both day-first and\nmonth-first would fit, so the person should say), `decimal` (`.` or `,`), and `statuses` (a guess of what each status value means; an empty string = the person must say). A file may have at most\n3000 reservations and 10 MB.\n","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"file":{"type":"string","format":"binary"},"sheet":{"type":"string"},"header_row":{"type":"integer","minimum":1}}}}}},"responses":{"200":{"description":"What the file holds, and the guesses.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportInspection"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"description":"The file cannot be read (`invalid_file`), for example an old `.xls`, a damaged workbook, or too many rows. The message says what to do.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/properties/{id}/imports":{"get":{"tags":["Reservations"],"operationId":"listImports","summary":"List the imports of a property","description":"Needs `read:reservations`. The imports that were run, newest first (the last 50).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The imports.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ImportBatch"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}},"post":{"tags":["Reservations"],"operationId":"runImport","summary":"Import the reservations of a file","description":"Needs `write:reservations`. For a property that Antero Connect runs (`channel_manager_authoritative`); a property whose own software runs its room count answers `409 import_not_allowed`.\nOne file, one property. Send `multipart/form-data` with the file in `file` and these fields: `mapping` (JSON, see below), `dry_run` (`true`: do everything and keep nothing, so the person sees\nexactly what would happen) and `skip_errors` (`true`: import the good rows and leave out the rows with errors; without it, one error stops the import and nothing is saved, `blocked: true`).\n\n`mapping`: `fields` (field to 0-based column index: `external_id`, `arrival`, `departure`, `guest_name` (or `first_name` and `last_name`), `room_type`, `rooms`, `adults`, `children`, `total`,\n`status`, `payment_status`, `email`, `phone`, `country`, `notes`, `booked_at`, `source_channel`), `date_format`, `decimal`, `room_types` (the room column's value in lower case with single spaces,\nto a room type id of this property), `default_room_type_id` (for a file with no room column), `statuses` (a status value, the same way, to `confirmed`, `cancelled` or `skip`), `sheet`, `header_row`.\n\nWhat is imported are reservations of source `import`. A reservation still ahead of today (in the property's time zone) takes its rooms off sale from the rooms the hotel has on sale, like a booking\nof the hotel's own; one that is over only records the stay. Nothing is refused for lack of rooms or a missing price: the nights where the file needs more rooms than are on sale are counted in\n`overbooked_nights`, and a missing price is counted in `no_price`. The booking number of the file is the reservation's reference: a number the property already has is left as it is\n(`duplicates`), so the same file can be sent again. Card numbers are never read: there is no field for them. The whole file goes in one transaction, and the same `Idempotency-Key` imports it once.\n","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file","mapping"],"properties":{"file":{"type":"string","format":"binary"},"mapping":{"type":"string","description":"The mapping, as JSON."},"dry_run":{"type":"string","enum":["true","false"]},"skip_errors":{"type":"string","enum":["true","false"]}}}}}},"responses":{"200":{"description":"A dry run, or an import that was stopped by errors (`blocked`). Nothing was saved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportResult"}}}},"201":{"description":"Imported. `batch_id` names the import (see undo).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportResult"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"`import_not_allowed`: the property's own software runs its room count.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"`payload_too_large`: the file is bigger than 10 MB.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The file cannot be read (`invalid_file`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/import-templates":{"get":{"tags":["Reservations"],"operationId":"listImportTemplates","summary":"List the saved ways of reading an import file","description":"Needs `read:reservations`. The templates of the organization (they are not tied to a property), by name.","responses":{"200":{"description":"The templates.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ImportTemplate"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"}}},"post":{"tags":["Reservations"],"operationId":"saveImportTemplate","summary":"Save a way of reading an import file","description":"Needs `write:reservations`. Keeps what a person decided while mapping a file, so the next file from the same system needs no mapping: the column of each field **by the text of its header**, how dates\nand amounts are written, what the statuses mean, and which room type a name in the file is **by the room type's name** (so the template fits another property of the organization too). A name\nthat already exists (in any capitals) is replaced (`200`); a new one is `201`. An organization keeps at most 50 (`409 too_many_templates`).\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["name","template"],"properties":{"name":{"type":"string","minLength":1,"maxLength":80},"template":{"$ref":"#/components/schemas/ImportTemplateBody"}}}}}},"responses":{"200":{"description":"A template of that name was replaced.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportTemplate"}}}},"201":{"description":"Saved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportTemplate"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"409":{"description":"`too_many_templates`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/import-templates/{id}":{"delete":{"tags":["Reservations"],"operationId":"deleteImportTemplate","summary":"Delete a saved way of reading an import file","description":"Needs `write:reservations`. Removes the template for good; imports already made are not touched, and a later file is guessed again (or read with another template).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Deleted.","content":{"application/json":{"schema":{"type":"object","required":["deleted"],"properties":{"deleted":{"type":"boolean"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/imports/{id}/undo":{"post":{"tags":["Reservations"],"operationId":"undoImport","summary":"Undo an import","description":"Needs `write:reservations`. Cancels every reservation the import made that is not cancelled yet and gives their rooms back; the reservations stay in the list as cancelled, so the history is not\nrewritten. Undoing twice is the same as once.\n","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The import, now `undone`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportBatch"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/members/{id}":{"parameters":[{"$ref":"#/components/parameters/Id"}],"patch":{"tags":["Team"],"operationId":"changeMemberRole","summary":"Change a member's role","description":"Only an owner may touch an owner or an admin; an admin may move staff and readonly. Nobody changes themselves (409\n`cannot_change_yourself`), so the organization always keeps an owner. The person's open sessions take the new role at once.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["role"],"properties":{"role":{"type":"string","enum":["owner","admin","staff","readonly"]}}}}}},"responses":{"200":{"description":"The member.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Member"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"`cannot_change_yourself`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"tags":["Team"],"operationId":"removeMember","summary":"Remove a member from the team","description":"Same rules as changing a role. The person's sessions in this organization end at once; their other organizations are untouched.","responses":{"200":{"description":"Removed.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["removed"]}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"`cannot_change_yourself`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/invitations":{"post":{"tags":["Team"],"operationId":"invitePerson","summary":"Invite a person by email","description":"The email carries a sign-in link; signing in by it (or by any link sent to that address while the invitation is open, 7 days)\nmakes the person a member with the role. Inviting an address again replaces its open invitation. When the email cannot be sent\nnothing is saved (503 `email_not_sent`; 503 `email_not_configured` when the server has no mail setup). 409 `already_member`.\n","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email","role"],"properties":{"email":{"type":"string","format":"email"},"role":{"type":"string","enum":["owner","admin","staff","readonly"]},"locale":{"type":"string","description":"Language of the email (en, id, ms, zh, vi, th, fil). Default: from Accept-Language, else English."}}}}}},"responses":{"201":{"description":"The open invitation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invitation"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"409":{"description":"`already_member`, `too_many_invitations`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"`email_not_sent`, `email_not_configured`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/invitations/{id}":{"parameters":[{"$ref":"#/components/parameters/Id"}],"delete":{"tags":["Team"],"operationId":"cancelInvitation","summary":"Cancel an open invitation","description":"Requires a person signed in as owner or admin (a session, not an API key). Cancels an invitation that has not been accepted; the link in the email stops working. Cancelling one that is already accepted or gone is a `404`.\n","responses":{"200":{"description":"Cancelled.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["cancelled"]}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/properties":{"get":{"tags":["Properties"],"operationId":"listProperties","summary":"List properties","description":"Requires `read:catalog`. A key limited to some properties sees only those.","parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/After"},{"$ref":"#/components/parameters/IncludeArchived"}],"responses":{"200":{"description":"A page of properties.","content":{"application/json":{"example":{"data":[{"id":"66427eb8-549a-5488-90ca-7d10ee92bc4e","name":"Villa Sunrise","timezone":"Asia/Makassar","currency":"USD","authority_mode":"pms_authoritative","status":"active","address":"","city":"","country":"","phone":"","email":"","website":"","check_in_time":"14:00","check_out_time":"11:00","sender_name":"","reply_to":"","created_at":"2027-03-01T09:00:00Z","updated_at":"2027-03-01T09:00:00Z"}],"next_cursor":null},"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Property"}},"next_cursor":{"type":["string","null"]}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"}}},"post":{"tags":["Properties"],"operationId":"createProperty","summary":"Create a property","description":"Requires `write:catalog`. A key limited to specific properties cannot create new ones\n(403 `forbidden_property`).\n","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"example":{"name":"Villa Sunrise","timezone":"Asia/Makassar","currency":"USD","authority_mode":"pms_authoritative"},"schema":{"$ref":"#/components/schemas/PropertyCreate"}}}},"responses":{"201":{"description":"The created property.","content":{"application/json":{"example":{"id":"66427eb8-549a-5488-90ca-7d10ee92bc4e","name":"Villa Sunrise","timezone":"Asia/Makassar","currency":"USD","authority_mode":"pms_authoritative","status":"active","address":"","city":"","country":"","phone":"","email":"","website":"","check_in_time":"14:00","check_out_time":"11:00","sender_name":"","reply_to":"","created_at":"2027-03-01T09:00:00Z","updated_at":"2027-03-01T09:00:00Z"},"schema":{"$ref":"#/components/schemas/Property"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"409":{"$ref":"#/components/responses/Conflict"}}}},"/v1/properties/{id}":{"parameters":[{"$ref":"#/components/parameters/Id"}],"get":{"tags":["Properties"],"operationId":"getProperty","summary":"Get a property","description":"Requires `read:catalog`. One property: name, time zone, currency (ISO 4217, USD unless set), and `authority_mode`, which says who counts the rooms (`channel_manager_authoritative` or `pms_authoritative`). A property the key may not see is a `404`, the same as one that does not exist.\n","responses":{"200":{"description":"The property.","content":{"application/json":{"example":{"id":"66427eb8-549a-5488-90ca-7d10ee92bc4e","name":"Villa Sunrise","timezone":"Asia/Makassar","currency":"USD","authority_mode":"pms_authoritative","status":"active","address":"","city":"","country":"","phone":"","email":"","website":"","check_in_time":"14:00","check_out_time":"11:00","sender_name":"","reply_to":"","created_at":"2027-03-01T09:00:00Z","updated_at":"2027-03-01T09:00:00Z"},"schema":{"$ref":"#/components/schemas/Property"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}},"patch":{"tags":["Properties"],"operationId":"updateProperty","summary":"Update a property","description":"Requires `write:catalog`. Only the fields you send change. `currency` cannot be changed.\nTo remove a property, set `status` to `archived`; nothing is ever deleted.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PropertyUpdate"}}}},"responses":{"200":{"description":"The updated property.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Property"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/properties/{id}/room-types":{"parameters":[{"$ref":"#/components/parameters/Id"}],"get":{"tags":["Room types"],"operationId":"listRoomTypes","summary":"List the room types of a property","description":"Requires `read:catalog`. The room types of a property, newest last, in pages (see pagination). Archived room types are left out unless `include_archived=true`.\n","parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/After"},{"$ref":"#/components/parameters/IncludeArchived"}],"responses":{"200":{"description":"A page of room types.","content":{"application/json":{"example":{"data":[{"id":"dd2a27cc-c0cf-56b6-8aed-70a4dab3b427","property_id":"66427eb8-549a-5488-90ca-7d10ee92bc4e","name":"Suite","code":"STE","total_units":2,"max_occupancy":4,"status":"active","created_at":"2027-03-01T09:02:00Z","updated_at":"2027-03-01T09:02:00Z"},{"id":"ab94a25e-5cef-5d1b-92c3-f0f9ddd9c53f","property_id":"66427eb8-549a-5488-90ca-7d10ee92bc4e","name":"Deluxe","code":"DLX","total_units":6,"max_occupancy":3,"status":"active","created_at":"2027-03-01T09:01:00Z","updated_at":"2027-03-01T09:01:00Z"}],"next_cursor":null},"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RoomType"}},"next_cursor":{"type":["string","null"]}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}},"post":{"tags":["Room types"],"operationId":"createRoomType","summary":"Create a room type","description":"Requires `write:catalog`. `code` is unique within the property and cannot be changed later.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"example":{"name":"Deluxe","code":"DLX","total_units":6,"max_occupancy":3},"schema":{"$ref":"#/components/schemas/RoomTypeCreate"}}}},"responses":{"201":{"description":"The created room type.","content":{"application/json":{"example":{"id":"ab94a25e-5cef-5d1b-92c3-f0f9ddd9c53f","property_id":"66427eb8-549a-5488-90ca-7d10ee92bc4e","name":"Deluxe","code":"DLX","total_units":6,"max_occupancy":3,"status":"active","created_at":"2027-03-01T09:01:00Z","updated_at":"2027-03-01T09:01:00Z"},"schema":{"$ref":"#/components/schemas/RoomType"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"}}}},"/v1/room-types/{id}":{"parameters":[{"$ref":"#/components/parameters/Id"}],"get":{"tags":["Room types"],"operationId":"getRoomType","summary":"Get a room type","description":"Requires `read:catalog`. One room type with `total_units` (how many rooms exist) and `max_occupancy`. Availability can never be set above `total_units`.\n","responses":{"200":{"description":"The room type.","content":{"application/json":{"example":{"id":"ab94a25e-5cef-5d1b-92c3-f0f9ddd9c53f","property_id":"66427eb8-549a-5488-90ca-7d10ee92bc4e","name":"Deluxe","code":"DLX","total_units":6,"max_occupancy":3,"status":"active","created_at":"2027-03-01T09:01:00Z","updated_at":"2027-03-01T09:01:00Z"},"schema":{"$ref":"#/components/schemas/RoomType"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}},"patch":{"tags":["Room types"],"operationId":"updateRoomType","summary":"Update a room type","description":"Requires `write:catalog`. `code` cannot be changed. Archive with `status`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoomTypeUpdate"}}}},"responses":{"200":{"description":"The updated room type.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoomType"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/properties/{id}/rate-plans":{"parameters":[{"$ref":"#/components/parameters/Id"}],"get":{"tags":["Rate plans"],"operationId":"listRatePlans","summary":"List the rate plans of a property","description":"Requires `read:catalog`. The rate plans of a property. A plan with `parent_rate_plan_id` is derived: its price is the parent's price changed by a rule, worked out when the parent's price is written.\n","parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/After"},{"$ref":"#/components/parameters/IncludeArchived"}],"responses":{"200":{"description":"A page of rate plans.","content":{"application/json":{"example":{"data":[{"id":"5b04a6c7-8418-5453-b9f5-dddde5a4d190","property_id":"66427eb8-549a-5488-90ca-7d10ee92bc4e","room_type_id":"ab94a25e-5cef-5d1b-92c3-f0f9ddd9c53f","name":"Standard rate","code":"STD","currency":"USD","parent_rate_plan_id":null,"derivation":null,"status":"active","created_at":"2027-03-01T09:03:00Z","updated_at":"2027-03-01T09:03:00Z"}],"next_cursor":null},"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RatePlan"}},"next_cursor":{"type":["string","null"]}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}},"post":{"tags":["Rate plans"],"operationId":"createRatePlan","summary":"Create a rate plan","description":"Requires `write:catalog`. The room type must belong to the same property. `currency` defaults to the\nproperty's currency and must equal it.\n\n**Derived plans.** A rate plan may follow a parent rate plan of the same property: set\n`parent_rate_plan_id` **together with** `derivation` (and only then). Its price is the parent's\nprice adjusted by the rule and rounded, and Antero Connect keeps it up to date whenever the parent's price\nchanges; you never set a derived plan's price yourself. Chains may be at most 3 plans deep.\n","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"example":{"room_type_id":"ab94a25e-5cef-5d1b-92c3-f0f9ddd9c53f","name":"Standard rate","code":"STD"},"schema":{"$ref":"#/components/schemas/RatePlanCreate"}}}},"responses":{"201":{"description":"The created rate plan.","content":{"application/json":{"example":{"id":"5b04a6c7-8418-5453-b9f5-dddde5a4d190","property_id":"66427eb8-549a-5488-90ca-7d10ee92bc4e","room_type_id":"ab94a25e-5cef-5d1b-92c3-f0f9ddd9c53f","name":"Standard rate","code":"STD","currency":"USD","parent_rate_plan_id":null,"derivation":null,"status":"active","created_at":"2027-03-01T09:03:00Z","updated_at":"2027-03-01T09:03:00Z"},"schema":{"$ref":"#/components/schemas/RatePlan"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"}}}},"/v1/rate-plans/{id}":{"parameters":[{"$ref":"#/components/parameters/Id"}],"get":{"tags":["Rate plans"],"operationId":"getRatePlan","summary":"Get a rate plan","description":"Requires `read:catalog`. One rate plan: its room type, currency, whether it is derived from another plan, and its status.\n","responses":{"200":{"description":"The rate plan.","content":{"application/json":{"example":{"id":"5b04a6c7-8418-5453-b9f5-dddde5a4d190","property_id":"66427eb8-549a-5488-90ca-7d10ee92bc4e","room_type_id":"ab94a25e-5cef-5d1b-92c3-f0f9ddd9c53f","name":"Standard rate","code":"STD","currency":"USD","parent_rate_plan_id":null,"derivation":null,"status":"active","created_at":"2027-03-01T09:03:00Z","updated_at":"2027-03-01T09:03:00Z"},"schema":{"$ref":"#/components/schemas/RatePlan"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}},"patch":{"tags":["Rate plans"],"operationId":"updateRatePlan","summary":"Update a rate plan","description":"Requires `write:catalog`. `code`, `room_type_id`, `currency` and `parent_rate_plan_id` cannot be\nchanged. Archive with `status`. For a derived plan you may change `derivation`; its prices are then\nrecomputed for every day the parent has a price. An archived derived plan is not kept up to date;\nre-activating it recomputes it.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RatePlanUpdate"}}}},"responses":{"200":{"description":"The updated rate plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RatePlan"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/properties/{id}/availability":{"parameters":[{"$ref":"#/components/parameters/Id"}],"get":{"tags":["Availability and rates"],"operationId":"getAvailability","summary":"Read availability per room type and day","description":"Requires `read:ari`. Returns the stored days in the range; a day with no row has never been set.\nThe range may cover at most 540 days.\n","parameters":[{"$ref":"#/components/parameters/DateFrom"},{"$ref":"#/components/parameters/DateTo"},{"name":"room_type_id","in":"query","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The stored days, ordered by date.","content":{"application/json":{"example":{"data":[{"room_type_id":"dd2a27cc-c0cf-56b6-8aed-70a4dab3b427","date":"2027-03-10","available":2,"total_units":2,"version":1},{"room_type_id":"ab94a25e-5cef-5d1b-92c3-f0f9ddd9c53f","date":"2027-03-10","available":5,"total_units":6,"version":1}]},"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AvailabilityDay"}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}},"put":{"tags":["Availability and rates"],"operationId":"putAvailability","summary":"Set availability (absolute state)","description":"Requires `write:ari`. Each item sets the number of rooms still available for a room type on every\nday of an inclusive range. This is **absolute state, not a delta**: sending the same push twice\nchanges nothing. Days whose value does not change are not touched.\n\n**`pms_version`** is required for `pms_authoritative` properties. Send a number that grows with\nevery new push. A push with a version older than the newest accepted one is refused with\n`409 stale_version` and changes nothing, so a delayed old snapshot cannot overwrite a newer one.\nThe same version with the same body is a retry and answers 200 without changes; the same version\nwith a different body is `409 version_conflict`.\n\nLimits: at most 500 items, each range at most 540 days, at most 50,000 days in total. `available`\ncannot exceed the room type's `total_units`. Items are applied in order; later items win.\n\n**`feed_applied_through`** is how the PMS confirms reservations. When a reservation arrives from a channel, Antero Connect\nholds its rooms (the other channels stop selling them) until the PMS says its numbers already count the\nreservation: pull `GET …/reservation-feed`, record the entries, then push availability with\n`feed_applied_through` set to the last number recorded. A property in `pms_authoritative` mode that has a feed\nmust send it with every availability push (400 `feed_applied_through_required`); before the first reservation\nthere is nothing to confirm. A refused push changes nothing. Holds are never released by time.\n","parameters":[{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"required":true,"content":{"application/json":{"example":{"items":[{"room_type_id":"ab94a25e-5cef-5d1b-92c3-f0f9ddd9c53f","date_from":"2027-03-10","date_to":"2027-03-16","available":5},{"room_type_id":"dd2a27cc-c0cf-56b6-8aed-70a4dab3b427","date_from":"2027-03-10","date_to":"2027-03-16","available":2}],"pms_version":1},"schema":{"$ref":"#/components/schemas/AvailabilityPut"}}}},"responses":{"200":{"description":"How many days changed.","content":{"application/json":{"example":{"changed_days":14,"unchanged_days":0,"derived_changed_days":0,"pms_version":1,"released_holds":0},"schema":{"$ref":"#/components/schemas/PushResult"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"}}}},"/v1/properties/{id}/rates":{"parameters":[{"$ref":"#/components/parameters/Id"}],"get":{"tags":["Availability and rates"],"operationId":"getRates","summary":"Read rates per rate plan and day","description":"Requires `read:ari`. At most 540 days. `amount` is `null` for a day that has restrictions but no price yet.","parameters":[{"$ref":"#/components/parameters/DateFrom"},{"$ref":"#/components/parameters/DateTo"},{"name":"rate_plan_id","in":"query","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The stored days, ordered by date.","content":{"application/json":{"example":{"data":[{"rate_plan_id":"5b04a6c7-8418-5453-b9f5-dddde5a4d190","date":"2027-03-10","amount":12000,"currency":"USD","version":1},{"rate_plan_id":"5b04a6c7-8418-5453-b9f5-dddde5a4d190","date":"2027-03-11","amount":12000,"currency":"USD","version":1}]},"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RateDay"}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}},"put":{"tags":["Availability and rates"],"operationId":"putRates","summary":"Set rates (absolute state)","description":"Requires `write:ari`. `amount` is a whole number of the **minor unit** of the rate plan's currency\nas defined by ISO 4217: US$120.00 is `12000` (cents); a currency without decimals such as JPY uses\nwhole units (JPY 120 is `120`). Currencies default to USD. `pms_version`, limits and behavior are as for availability. Rates and\nrestrictions share one version sequence per property.\n\nYou cannot set the price of a **derived** rate plan (400): set it on the parent. Derived plans\nare recomputed in the same transaction; `derived_changed_days` reports how many of their days changed.\n\n**Mistyped prices are refused before anything is saved.** A price outside the property's price limits\n(`GET`/`PUT /v1/properties/{id}/price-guard`) is `409 price_guard`. A price more than five times above, or less than a fifth of, what the\nrate plan has in the same days is `409 price_change_large`; send the same request with `\"confirm_large_change\": true` if it is meant.\n","parameters":[{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"required":true,"content":{"application/json":{"example":{"items":[{"rate_plan_id":"5b04a6c7-8418-5453-b9f5-dddde5a4d190","date_from":"2027-03-10","date_to":"2027-03-16","amount":12000}],"pms_version":2},"schema":{"$ref":"#/components/schemas/RatesPut"}}}},"responses":{"200":{"description":"How many days changed.","content":{"application/json":{"example":{"changed_days":7,"unchanged_days":0,"derived_changed_days":0,"pms_version":2,"released_holds":0},"schema":{"$ref":"#/components/schemas/PushResult"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"}}}},"/v1/properties/{id}/holds":{"parameters":[{"$ref":"#/components/parameters/Id"}],"get":{"tags":["Reservations"],"operationId":"listHeldRooms","summary":"Rooms held for the hotel's software","description":"Requires `read:reservations`. The active holds of a property, by reservation, the longest waiting first. A hold is released by the software's confirmation\n(`feed_applied_through`) or by a person (`POST …/holds/release`); time never releases one.\n","responses":{"200":{"description":"The active holds.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/HeldReservation"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/properties/{id}/holds/release":{"parameters":[{"$ref":"#/components/parameters/Id"}],"post":{"tags":["Reservations"],"operationId":"releaseHeldRooms","summary":"Release held rooms by hand","description":"Requires `write:holds` (owners and admins have it; a key must ask for it). For when the hotel's software is gone or lost its count and will never confirm.\n**Releasing rooms the software did count can sell them a second time**, so the request must say `confirm: true`, and must say what to release:\n`reservation_ids`, or `older_than_hours` (holds that have waited at least that long), or both. Each release is written in the history, and the\nchannels are told of the rooms that are free again.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["confirm"],"properties":{"confirm":{"type":"boolean"},"reservation_ids":{"type":"array","maxItems":200,"items":{"type":"string","format":"uuid"}},"older_than_hours":{"type":"integer","minimum":1,"maximum":8760}}}}}},"responses":{"200":{"description":"How many holds were released.","content":{"application/json":{"schema":{"type":"object","required":["released_holds"],"properties":{"released_holds":{"type":"integer"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/properties/{id}/price-guard":{"parameters":[{"$ref":"#/components/parameters/Id"}],"get":{"tags":["Availability and rates"],"operationId":"getPriceGuard","summary":"Read the price limits of a property","description":"Requires `read:ari`. `floor` and `ceiling` are whole numbers of the minor unit of the property's currency; `null` = no limit on that side.","responses":{"200":{"description":"The limits.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceGuard"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}},"put":{"tags":["Availability and rates"],"operationId":"putPriceGuard","summary":"Set the price limits of a property","description":"Requires `write:ari`. Replaces both limits; send `null` for no limit. A rate outside the limits is refused with `409 price_guard` before it is saved or\nsent to a channel, and no flag lifts that: change the limits first.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceGuard"}}}},"responses":{"200":{"description":"The limits now in force.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PriceGuard"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/properties/{id}/restrictions":{"parameters":[{"$ref":"#/components/parameters/Id"}],"get":{"tags":["Availability and rates"],"operationId":"getRestrictions","summary":"Read restrictions per rate plan and day","description":"Requires `read:ari`. At most 540 days. `effective_stop_sell` includes a stop-sell inherited from a parent plan.","parameters":[{"$ref":"#/components/parameters/DateFrom"},{"$ref":"#/components/parameters/DateTo"},{"name":"rate_plan_id","in":"query","schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The stored days, ordered by date.","content":{"application/json":{"example":{"data":[{"rate_plan_id":"5b04a6c7-8418-5453-b9f5-dddde5a4d190","date":"2027-03-10","min_stay":null,"max_stay":null,"closed_to_arrival":false,"closed_to_departure":false,"stop_sell":false,"effective_stop_sell":false,"version":1},{"rate_plan_id":"5b04a6c7-8418-5453-b9f5-dddde5a4d190","date":"2027-03-11","min_stay":null,"max_stay":null,"closed_to_arrival":false,"closed_to_departure":false,"stop_sell":false,"effective_stop_sell":false,"version":1}]},"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RestrictionDay"}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}},"put":{"tags":["Availability and rates"],"operationId":"putRestrictions","summary":"Set restrictions (absolute state)","description":"Requires `write:ari`. Every field of an item is required, because this sets the complete\nrestriction state of the days: `min_stay` and `max_stay` may be `null` (no limit); the three\nbooleans must be present. `pms_version` and limits are as for availability.\n","parameters":[{"$ref":"#/components/parameters/DryRun"}],"requestBody":{"required":true,"content":{"application/json":{"example":{"items":[{"rate_plan_id":"5b04a6c7-8418-5453-b9f5-dddde5a4d190","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":3},"schema":{"$ref":"#/components/schemas/RestrictionsPut"}}}},"responses":{"200":{"description":"How many days changed.","content":{"application/json":{"example":{"changed_days":2,"unchanged_days":0,"derived_changed_days":0,"pms_version":3,"released_holds":0},"schema":{"$ref":"#/components/schemas/PushResult"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"}}}},"/v1/channels":{"get":{"tags":["Channels"],"operationId":"listChannels","summary":"List the channels Antero Connect can connect to","description":"Requires `read:channels`. The catalog is global; every organization sees the same list.","responses":{"200":{"description":"The enabled channels.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Channel"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"}}}},"/v1/properties/{id}/channel-connections":{"parameters":[{"$ref":"#/components/parameters/Id"}],"get":{"tags":["Channels"],"operationId":"listChannelConnections","summary":"List the channel connections of a property","description":"Requires `read:channels`. Credentials are never returned.","parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/After"}],"responses":{"200":{"description":"A page of connections.","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ChannelConnection"}},"next_cursor":{"type":["string","null"]}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}},"post":{"tags":["Channels"],"operationId":"createChannelConnection","summary":"Connect a property to a channel","description":"Requires `write:channels`. **`sandbox` defaults to `true`**: a connection to a live channel must ask\nfor `sandbox: false` explicitly, and the simulator channel can only ever be a sandbox. `credentials`\nis an optional JSON object (at most 8 KB) whose shape depends on the channel. It is stored\nencrypted and is **write-only**: no endpoint ever returns it. Names are unique per property and channel.\n","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"example":{"channel_code":"sim","name":"Practice channel","sandbox":true,"remote_property_id":"DEMO-HOTEL","credentials":{"api_key":"demo"}},"schema":{"$ref":"#/components/schemas/ChannelConnectionCreate"}}}},"responses":{"201":{"description":"The created connection.","content":{"application/json":{"example":{"id":"ef43141e-e622-548b-b9f5-8c0b139e2ae3","property_id":"66427eb8-549a-5488-90ca-7d10ee92bc4e","channel_code":"sim","name":"Practice channel","sandbox":true,"status":"active","remote_property_id":"DEMO-HOTEL","has_credentials":true,"credentials_fingerprint":"5d36e56e2868b806","key_version":1,"created_at":"2027-03-01T09:22:00Z","updated_at":"2027-03-01T09:22:00Z"},"schema":{"$ref":"#/components/schemas/ChannelConnection"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"}}}},"/v1/channel-connections/{id}":{"parameters":[{"$ref":"#/components/parameters/Id"}],"get":{"tags":["Channels"],"operationId":"getChannelConnection","summary":"Get a channel connection","description":"Requires `read:channels`. Credentials are never returned; only whether they exist and a fingerprint.","responses":{"200":{"description":"The connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChannelConnection"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}},"patch":{"tags":["Channels"],"operationId":"updateChannelConnection","summary":"Update a channel connection","description":"Requires `write:channels`. `credentials`, when sent, **replaces** the stored credentials entirely.\nThe channel and the `sandbox` flag cannot be changed: moving a connection between sandbox and\nproduction would let a test touch a live channel.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChannelConnectionUpdate"}}}},"responses":{"200":{"description":"The updated connection.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChannelConnection"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"}}}},"/v1/channel-connections/{id}/mappings":{"parameters":[{"$ref":"#/components/parameters/Id"}],"get":{"tags":["Channels"],"operationId":"getChannelMappings","summary":"Read the room and rate mappings of a connection","description":"Requires `read:channels`. Which of your room types and rate plans are matched to which room and rate of the channel. Only mapped rooms and rates are sent; a room sold at the channel that is not mapped here is reported as a decision when its booking arrives.\n","responses":{"200":{"description":"The mappings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Mappings"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}},"put":{"tags":["Channels"],"operationId":"putChannelMappings","summary":"Replace the mappings of a connection","description":"Requires `write:channels`. Replaces **all** mappings atomically. Mappings are one-to-one in both\ndirections: a room type maps to exactly one channel room and a channel room to exactly one room\ntype (the same for rates). Everything must belong to the connection's property, and a rate plan can\nonly be mapped if its room type is mapped in the same request. Unchanged pairs keep their identity;\nswapping two channel ids is allowed. An empty request removes all mappings.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Mappings"}}}},"responses":{"200":{"description":"The mappings after the change.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Mappings"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/channel-connections/{id}/sync-status":{"parameters":[{"$ref":"#/components/parameters/Id"}],"get":{"tags":["Channels"],"operationId":"getChannelSyncStatus","summary":"How far a connection is from the state Antero Connect wants it to be in","description":"Requires `read:channels`. A cell goes through three states: **wanted**, **sent** (the channel said OK,\n`in_sync`) and **proven** (the channel was read back and holds it, `confirmed`). `unverified` cells are\nwaiting to be read back; on a channel that cannot be read back they are `unverifiable` and can never\nbe proven. A cell that reads back different is made pending again and re-sent; after three times in a\nrow it is `disputed` and left alone until its value changes or a full sync is requested.\n","responses":{"200":{"description":"The synchronisation state.","content":{"application/json":{"example":{"cells":0,"in_sync":0,"confirmed":0,"unverified":0,"unverifiable":0,"pending":0,"waiting":0,"stuck":0,"disputed":0,"open_diffs":0,"blocked_until":null,"consecutive_failures":0,"last_error":null,"last_run_at":null,"last_success_at":null,"last_verified_at":null,"last_full_sync_at":null},"schema":{"$ref":"#/components/schemas/SyncStatus"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/sync-status":{"get":{"tags":["Channels"],"operationId":"listSyncStatus","summary":"The synchronisation state of every channel connection","description":"Requires `read:channels`. One entry per connection (limited to the properties of the key), each with\nthe same `sync` object as the per-connection endpoint.\n","parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/After"}],"responses":{"200":{"description":"A page of connection summaries.","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SyncSummary"}},"next_cursor":{"type":["string","null"]}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"}}}},"/v1/channel-connections/{id}/full-sync":{"parameters":[{"$ref":"#/components/parameters/Id"}],"post":{"tags":["Channels"],"operationId":"requestChannelFullSync","summary":"Send every cell again and read it back","description":"Requires `write:channels`. Forgets what the channel has accepted and proven, and releases held\ncells, so the next pass sends everything again (sending less before more, and still honouring any\nhold on increases) and reads it back. Asking twice before it starts is the same as asking once. Antero Connect\nalso does this on its own about once a day. Only an `active` connection can be synchronised.\n","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"202":{"description":"A full sync will start at the next pass.","content":{"application/json":{"schema":{"type":"object","required":["requested"],"properties":{"requested":{"type":"boolean"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"}}}},"/v1/channel-connections/{id}/reconciliation/diffs":{"parameters":[{"$ref":"#/components/parameters/Id"}],"get":{"tags":["Channels"],"operationId":"listReconciliationDiffs","summary":"Differences found between what Antero Connect wants and what the channel holds","description":"Requires `read:channels`. Each entry is one field of one cell found different by a read-back.\nAntero Connect re-sends the cell by itself; a difference becomes `healed` once the channel reads back right.\n`missing` means the channel showed nothing usable for that day.\n","parameters":[{"name":"status","in":"query","schema":{"type":"string","enum":["open","healed","disputed","ignored"]}},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/After"}],"responses":{"200":{"description":"A page of differences.","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ReconciliationDiff"}},"next_cursor":{"type":["string","null"]}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/channel-connections/{id}/reconciliation/diffs/{diff_id}/ignore":{"parameters":[{"$ref":"#/components/parameters/Id"},{"name":"diff_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"post":{"tags":["Channels"],"operationId":"ignoreReconciliationDiff","summary":"Accept that the channel differs","description":"Requires `write:channels`. Marks every open difference of the same cell as `ignored` and stops\nre-sending that cell until its desired value changes or a full sync is requested. Recorded in the\naudit log. A difference that is already healed or ignored answers 409.\n","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The difference, now ignored.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReconciliationDiff"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"}}}},"/v1/channel-connections/{id}/reconciliation/runs":{"parameters":[{"$ref":"#/components/parameters/Id"}],"get":{"tags":["Channels"],"operationId":"listReconciliationRuns","summary":"History of read-back checks and full syncs","description":"Requires `read:channels`. The history of read-back checks: Antero Connect reads the channel back, compares it with what it meant to send, and repairs the difference. Each run says how many days matched, were repaired, or are unexplained.\n","parameters":[{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/After"}],"responses":{"200":{"description":"A page of runs.","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ReconciliationRun"}},"next_cursor":{"type":["string","null"]}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/channel-connections/{id}/capabilities":{"parameters":[{"$ref":"#/components/parameters/Id"}],"get":{"tags":["Channels"],"operationId":"getChannelCapabilities","summary":"What the channel claims, what was measured, and what Antero Connect relies on","description":"Requires `read:channels`. A channel's manifest only **claims** capabilities. Antero Connect measures the channel\nwith a probe (when the connection is first used, about every six hours, and on request) and a\nmeasurement can take a claimed capability away, never grant one that is not claimed. `effective` is what\nAntero Connect relies on. `closure_method` says how a closed day is sent: `stop_sell`, or `zero_availability`\nwhen the channel was measured to ignore stop-sell. It is `null` until the first probe. The budget is 80%\nof the measured rate, or the channel's starting value when no rate was measured.\n","responses":{"200":{"description":"The capability matrix.","content":{"application/json":{"example":{"closure_method":null,"budget_per_minute":null,"measured_rate_per_minute":null,"rate_source":null,"read_window_days":null,"round_trip_ms":null,"last_probe_at":null,"next_probe_at":null,"last_probe_error":null,"capabilities":[],"inventory_model":"state","closure_scope":"none","sub_channels":[],"mirrors_reservations":false,"booking_search":true},"schema":{"$ref":"#/components/schemas/Capabilities"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/properties/{id}/setup":{"parameters":[{"$ref":"#/components/parameters/Id"}],"get":{"tags":["Setup"],"operationId":"getSetup","summary":"How far the hotel is with getting started","description":"Requires `read:catalog`. Computed from the data on every call (never stored): `steps` (id, done, required, detail), the\n`current` required step that is not done yet (null when all are), `percent` of the required steps done and `complete`.\nSteps: hotel, room_types, rates, channel, mapping, availability, test, live (optional), pms (optional).\n","responses":{"200":{"description":"The setup progress.","content":{"application/json":{"example":{"complete":false,"current":"channel","percent":57,"steps":[{"id":"hotel","done":true,"required":true,"detail":"Your hotel is set up."},{"id":"room_types","done":true,"required":true,"detail":"2 room types"}]},"schema":{"$ref":"#/components/schemas/SetupProgress"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/properties/{id}/pms-link":{"parameters":[{"$ref":"#/components/parameters/Id"}],"get":{"tags":["Setup"],"operationId":"getPmsLink","summary":"How the hotel software (PMS) is doing","description":"Requires `read:ari`. When the PMS was last heard from (a key that pushed availability, rates or restrictions, or read the reservation feed;\na person at the panel does not count), how far it got with the feed, how many bookings wait for its confirmation and for how long, and how\nmany bookings Antero Connect keeps rooms back for meanwhile. `state`: `never_connected`, `connected`, `waiting` (a booking has waited 5 minutes or more),\n`silent` (not heard for more than 15 minutes). The monitor raises `pms_silent` (warning after 15 minutes, critical after 2 hours) for a property\nwhose PMS decides availability and that has a live channel.\n","responses":{"200":{"description":"The state of the connection.","content":{"application/json":{"example":{"state":"connected","last_heard_at":"2027-03-01T09:17:00Z","last_push_at":"2027-03-01T09:18:00Z","last_feed_read_at":"2027-03-01T09:17:00Z","pms_version":4,"feed_head":4,"applied_through":1,"applied_at":"2027-03-01T09:19:00Z","waiting_entries":2,"oldest_waiting_seconds":0,"held_bookings":1},"schema":{"$ref":"#/components/schemas/PmsLink"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/properties/{id}/calendar":{"parameters":[{"$ref":"#/components/parameters/Id"}],"get":{"tags":["Setup"],"operationId":"getCalendar","summary":"Availability, prices and channel progress for a stretch of days, in one reading","description":"Requires `read:ari`. At most 62 days. Per room type and day: `available` (null = never set), `held`, `effective`\n(available less held, never below 0) and `closed`. Per rate plan and day: price and restrictions. `sync` has, per channel\nconnection and room type, one letter per day: `c` confirmed by the channel, `s` sent, `w` waiting, `-` nothing to send.\n","parameters":[{"$ref":"#/components/parameters/DateFrom"},{"$ref":"#/components/parameters/DateTo"}],"responses":{"200":{"description":"The calendar.","content":{"application/json":{"example":{"date_from":"2027-03-10","date_to":"2027-03-12","rooms":[{"room_type_id":"dd2a27cc-c0cf-56b6-8aed-70a4dab3b427","name":"Suite","total_units":2,"days":[{"date":"2027-03-10","available":2,"held":0,"effective":2,"closed":false},{"date":"2027-03-11","available":2,"held":0,"effective":2,"closed":false},{"date":"2027-03-12","available":2,"held":0,"effective":2,"closed":false}]},{"room_type_id":"ab94a25e-5cef-5d1b-92c3-f0f9ddd9c53f","name":"Deluxe","total_units":6,"days":[{"date":"2027-03-10","available":5,"held":0,"effective":5,"closed":false},{"date":"2027-03-11","available":5,"held":0,"effective":5,"closed":false},{"date":"2027-03-12","available":5,"held":0,"effective":5,"closed":false}]}],"rates":[{"rate_plan_id":"5b04a6c7-8418-5453-b9f5-dddde5a4d190","room_type_id":"ab94a25e-5cef-5d1b-92c3-f0f9ddd9c53f","name":"Standard rate","days":[{"date":"2027-03-10","amount":12000,"min_stay":null,"max_stay":null,"closed_to_arrival":false,"closed_to_departure":false,"stop_sell":false},{"date":"2027-03-11","amount":12000,"min_stay":null,"max_stay":null,"closed_to_arrival":false,"closed_to_departure":false,"stop_sell":false},{"date":"2027-03-12","amount":12000,"min_stay":2,"max_stay":null,"closed_to_arrival":false,"closed_to_departure":false,"stop_sell":false}]}],"sync":[]},"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/channel-connections/{id}/remote-catalog":{"parameters":[{"$ref":"#/components/parameters/Id"}],"get":{"tags":["Channels"],"operationId":"getRemoteCatalog","summary":"The rooms and rates the channel itself has","description":"Requires `read:channels`. Asks the channel (one call from its budget). `409 catalog_not_supported` when the channel cannot list\nits rooms; `502` with `credentials_rejected`, `property_not_found`, `rate_limited`, `channel_unreachable` or `channel_error` when it cannot answer.\nCredentials never appear in the answer.\n","responses":{"200":{"description":"The channel's rooms and rates.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"502":{"description":"The channel could not answer (see the error code).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/channel-connections/{id}/mapping-suggestions":{"parameters":[{"$ref":"#/components/parameters/Id"}],"get":{"tags":["Channels"],"operationId":"getMappingSuggestions","summary":"Suggested matches between our rooms and rates and the channel's","description":"Requires `read:channels`. Compares names (same, same without filler words, contained, similar) and gives each suggestion a\n`confidence` of high or medium; rates are matched inside their matched room. Items already mapped are kept and not suggested\nagain; `unmatched_remote` and `unmapped_local` list what is left. Nothing is saved: apply a suggestion with the mappings endpoint.\n","responses":{"200":{"description":"The suggestions.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"502":{"description":"The channel could not answer (see the error code).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/channel-connections/{id}/test":{"parameters":[{"$ref":"#/components/parameters/Id"}],"post":{"tags":["Channels"],"operationId":"testChannelConnection","summary":"Try the connection and say in plain words what happened","description":"Requires `write:channels`. Always answers 200 with a `status`: connected, credentials_rejected, property_not_found, channel_unreachable,\nrate_limited, unsupported or channel_error, plus the rooms and rates found and the latency when connected. Saves nothing.\n","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The outcome of the test.","content":{"application/json":{"example":{"status":"property_not_found","ok":false,"message":"The channel does not know that property ID. Check the ID you were given and try again.","rooms":null,"rates":null,"latency_ms":null},"schema":{"type":"object","additionalProperties":true}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/channel-connections/{id}/probe":{"parameters":[{"$ref":"#/components/parameters/Id"}],"post":{"tags":["Channels"],"operationId":"requestChannelProbe","summary":"Measure the channel again","description":"Requires `write:channels`. The next pass measures the channel (three calls from its request budget, all\nor none) before it sends anything, so that a change in what the channel really does is used at once.\nOnly an `active` connection can be probed.\n","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"202":{"description":"A probe will run at the next pass.","content":{"application/json":{"schema":{"type":"object","required":["requested"],"properties":{"requested":{"type":"boolean"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"}}}},"/v1/channel-connections/{id}/health":{"parameters":[{"$ref":"#/components/parameters/Id"}],"get":{"tags":["Channels"],"operationId":"getChannelHealth","summary":"How well a connection works","description":"Requires `read:channels`. `healthy`; `degraded` (working, with something to look at: a failed call, a rate\nlimit, cells the channel keeps refusing or does not keep); `down` (three failed calls in a row, or failing\nwith nothing succeeding for ten minutes); `auth_failed` (the channel rejects the credentials); `unknown`\n(nothing has run yet). It recovers by itself after a successful pass. `events` are the last 20 changes of\nstatus, newest first.\n","responses":{"200":{"description":"The health.","content":{"application/json":{"example":{"status":"unknown","reason":"","since":null,"consecutive_failures":0,"last_success_at":null,"last_error":null,"events":[]},"schema":{"$ref":"#/components/schemas/ChannelHealth"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/channel-connections/{id}/webhook":{"parameters":[{"$ref":"#/components/parameters/Id"}],"post":{"tags":["Channel messages"],"operationId":"issueChannelWebhook","summary":"Create (or replace) the webhook address of a connection","description":"Requires `write:channels`. Returns the token **once**: only a hash is stored. Give the path\n`/hooks/{token}` (on this server's address) to the channel as the address it should post reservations to.\nIssuing again replaces the token and so stops the old one. This endpoint does not accept an\n`Idempotency-Key`, because a replayed response would have to be stored with the secret in it.\n","responses":{"201":{"description":"The token and the path.","content":{"application/json":{"schema":{"type":"object","required":["token","path"],"properties":{"token":{"type":"string","description":"kwh_<8 hex>_<32 hex>. Shown once."},"path":{"type":"string","description":"The path to give to the channel: /hooks/<token>."}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}},"get":{"tags":["Channel messages"],"operationId":"getChannelWebhook","summary":"Whether a connection has a webhook address","description":"Requires `read:channels`. Never returns the token.","responses":{"200":{"description":"The webhook status.","content":{"application/json":{"schema":{"type":"object","required":["configured","prefix","created_at","last_used_at","revoked_at"],"properties":{"configured":{"type":"boolean","description":"A token exists and is not revoked."},"prefix":{"type":["string","null"],"description":"The 8 hex characters after `kwh_`, to tell tokens apart."},"created_at":{"type":["string","null"],"format":"date-time"},"last_used_at":{"type":["string","null"],"format":"date-time"},"revoked_at":{"type":["string","null"],"format":"date-time"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}},"delete":{"tags":["Channel messages"],"operationId":"revokeChannelWebhook","summary":"Stop the webhook address from working","description":"Requires `write:channels`. The address answers 404 from then on. 404 if there is no live token.","responses":{"200":{"description":"Revoked.","content":{"application/json":{"schema":{"type":"object","required":["revoked"],"properties":{"revoked":{"type":"boolean"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/channel-connections/{id}/inbound-messages":{"parameters":[{"$ref":"#/components/parameters/Id"}],"get":{"tags":["Channel messages"],"operationId":"listInboundMessages","summary":"Messages received from the channel","description":"Requires `read:channels`. The archive of what the channel sent, **after card data was removed** (card\nnumbers are masked to their last four digits, security codes are dropped). Guest contact data is never\nreturned here. `unknown` messages are kinds of event Antero Connect does not know: they are kept and answered 200.\n`unparseable` ones could not be read.\n","parameters":[{"name":"status","in":"query","schema":{"type":"string","enum":["received","processing","processed","pending","failed","ignored"]}},{"name":"event_kind","in":"query","schema":{"type":"string","enum":["reservation","unknown","unparseable"]}},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/After"}],"responses":{"200":{"description":"A page of messages.","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/InboundMessage"}},"next_cursor":{"type":["string","null"]}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/properties/{id}/notifications":{"parameters":[{"$ref":"#/components/parameters/Id"}],"get":{"tags":["Properties"],"operationId":"getNotifications","summary":"Who in the hotel is told by email about bookings","description":"Requires `read:catalog`. `404` until it has been set up with `PUT`.","responses":{"200":{"description":"The settings.","content":{"application/json":{"example":{"property_id":"66427eb8-549a-5488-90ca-7d10ee92bc4e","enabled":true,"recipients":["front@villa-sunrise.example","owner@villa-sunrise.example"],"on_new":true,"on_cancel":true,"locale":"en","since":"2027-03-01T09:21:00Z"},"schema":{"$ref":"#/components/schemas/Notifications"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}},"put":{"tags":["Properties"],"operationId":"putNotifications","summary":"Tell the hotel by email when a booking arrives or is cancelled","description":"Requires `write:catalog`. The whole document is sent each time. While `enabled`, the addresses in `recipients` (1 to 5, tidied and made unique) get one\nemail for each **new booking** (`on_new`) and each **cancellation** (`on_cancel`), whatever its source: a channel, the booking page, or someone in Antero Connect.\nA booking the hotel's own software reported (`source: pms`) is never news here. Bookings that came **before** it was switched on are history, not news,\nso turning it on (or on again) never floods an inbox. `locale` is the language of the email (`en` or `id`).\n\nNothing is lost if the mail server is down: what could not be sent is tried again. A booking is told once; in the rare case of a retry after a send that\nreally went out, it can be told twice, which is chosen over never telling.\n","requestBody":{"required":true,"content":{"application/json":{"example":{"enabled":true,"recipients":["front@villa-sunrise.example","owner@villa-sunrise.example"],"on_new":true,"on_cancel":true,"locale":"en"},"schema":{"$ref":"#/components/schemas/NotificationsInput"}}}},"responses":{"200":{"description":"Saved.","content":{"application/json":{"example":{"property_id":"66427eb8-549a-5488-90ca-7d10ee92bc4e","enabled":true,"recipients":["front@villa-sunrise.example","owner@villa-sunrise.example"],"on_new":true,"on_cancel":true,"locale":"en","since":"2027-03-01T09:21:00Z"},"schema":{"$ref":"#/components/schemas/Notifications"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/properties/{id}/notifications/test":{"parameters":[{"$ref":"#/components/parameters/Id"}],"post":{"tags":["Properties"],"operationId":"testNotifications","summary":"Send the test email to the saved addresses now","description":"Requires `write:catalog`. Sends the test email at once to each saved address, so that a hotel can see that it arrives (`409 no_recipients` before an\naddress is saved; `503 email_not_configured` when this server cannot send email). Nothing is booked or marked. Not idempotent: each call sends again.\n","responses":{"200":{"description":"Sent.","content":{"application/json":{"example":{"sent":true},"schema":{"type":"object","required":["sent"],"properties":{"sent":{"type":"boolean","const":true}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"503":{"description":"This server cannot send email, or the mail server did not take the message (`email_not_configured`, `email_not_sent`)."}}}},"/v1/properties/{id}/routines":{"parameters":[{"$ref":"#/components/parameters/Id"}],"get":{"tags":["Properties"],"operationId":"getRoutines","summary":"See the emails a hotel writes to its guests by itself","description":"Requires `read:catalog`. Two routines, both off until chosen: an email **before** the stay (`pre_days` days before arrival, 1 to 14, default 2) and one **after** it (`post_days` days after\ndeparture, 1 to 14, default 1). Each can carry the hotel's own words (`pre_message`, `post_message`, up to 1000 characters). They are sent only for stays the hotel made itself (by hand or on its booking\npage) that are confirmed and have an address that can be written to. A property that never chose answers with the defaults, both off.\n","responses":{"200":{"description":"The routines.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Routines"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}},"put":{"tags":["Properties"],"operationId":"putRoutines","summary":"Choose the emails a hotel writes to its guests by itself","description":"Requires `write:catalog`. Replaces the choices. A routine switched on (from off) **starts counting from that moment**: a stay whose moment to be written to had already passed is history, so\nswitching on never writes to guests about the past. Changing a routine that is already on does not restart it. Each guest is written to once per routine; a send that failed is tried again.\nThe email comes from the property's `sender_name` and carries its times, address and phone (see the property profile).\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"pre_enabled":{"type":"boolean"},"pre_days":{"type":"integer","minimum":1,"maximum":14,"default":2},"pre_message":{"type":"string","maxLength":1000},"post_enabled":{"type":"boolean"},"post_days":{"type":"integer","minimum":1,"maximum":14,"default":1},"post_message":{"type":"string","maxLength":1000},"locale":{"type":"string","enum":["en","id","ms","zh","vi","th","fil"],"default":"en","description":"The language the emails are written in."}}}}}},"responses":{"200":{"description":"The routines as saved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Routines"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/properties/{id}/routines/preview":{"parameters":[{"$ref":"#/components/parameters/Id"}],"post":{"tags":["Properties"],"operationId":"previewRoutine","summary":"See an email before a guest does","description":"Requires `read:catalog`. The email a guest would get, written with the given words and the property's profile, for an example guest. Nothing is sent and nothing is saved.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["kind"],"properties":{"kind":{"type":"string","enum":["pre","post"]},"message":{"type":"string","maxLength":1000},"locale":{"type":"string","enum":["en","id","ms","zh","vi","th","fil"]}}}}}},"responses":{"200":{"description":"The email.","content":{"application/json":{"schema":{"type":"object","required":["subject","body","from_name","reply_to"],"properties":{"subject":{"type":"string"},"body":{"type":"string"},"from_name":{"type":"string"},"reply_to":{"type":"string"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/properties/{id}/photos":{"parameters":[{"$ref":"#/components/parameters/Id"}],"get":{"tags":["Booking engine"],"operationId":"listPhotos","summary":"The pictures of the booking page","description":"Requires `read:catalog`. In the order they are shown. A picture with no `room_type_id` belongs to the hotel (the first one is the cover); otherwise to that room type.","responses":{"200":{"description":"The pictures (without the picture itself; fetch it by id).","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}},"post":{"tags":["Booking engine"],"operationId":"addPhoto","summary":"Add a picture to the booking page","description":"Requires `write:catalog`. The body is the picture itself (JPEG, PNG or WebP, at most 1.5 MB; what it is is told by its first bytes, not by\nthe `Content-Type` sent). `room_type_id` in the query makes it one room's picture. A property keeps at most 24 (`409 photo_limit`).\n","parameters":[{"name":"room_type_id","in":"query","required":false,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"image/jpeg":{"schema":{"type":"string","format":"binary"}},"image/png":{"schema":{"type":"string","format":"binary"}},"image/webp":{"schema":{"type":"string","format":"binary"}}}},"responses":{"201":{"description":"Added.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"description":"The picture is bigger than 1.5 MB."}}}},"/v1/properties/{id}/photos/{photo_id}":{"parameters":[{"$ref":"#/components/parameters/Id"},{"name":"photo_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"tags":["Booking engine"],"operationId":"getPhoto","summary":"One picture, as the picture itself","description":"Requires `read:catalog`. The bytes of the picture, for a person signed in to see it in the panel; guests use the page's own address.","parameters":[{"name":"size","in":"query","required":false,"description":"`small` for a copy about 480 px wide (the picture itself when there is none).","schema":{"type":"string","enum":["small"]}}],"responses":{"200":{"description":"The picture.","content":{"image/jpeg":{"schema":{"type":"string","format":"binary"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}},"delete":{"tags":["Booking engine"],"operationId":"deletePhoto","summary":"Remove a picture","description":"Requires `write:catalog`. The picture goes from the booking page at once; this cannot be undone.","responses":{"200":{"description":"Removed.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/properties/{id}/booking-engine":{"parameters":[{"$ref":"#/components/parameters/Id"}],"get":{"tags":["Booking engine"],"operationId":"getBookingEngine","summary":"The property's booking engine settings","description":"Requires `read:catalog`. `404` until it has been set up with `PUT`.","responses":{"200":{"description":"The settings.","content":{"application/json":{"example":{"property_id":"66427eb8-549a-5488-90ca-7d10ee92bc4e","enabled":true,"slug":"villa-sunrise-8def","title":"Villa Sunrise","accent":"#0a7d5a","welcome":"Book direct and get a free breakfast.","cancellation_policy":"Free cancellation until 3 days before arrival.","terms":"Check-in from 2 pm, check-out until 11 am.","max_nights":14,"max_rooms":3,"advance_days":365,"min_advance_days":1,"same_day_until":"18:00","fees":[{"name":"VAT","kind":"percent","basis_points":1000,"included":false},{"name":"Cleaning fee","kind":"per_stay","amount":2500,"included":false}],"questions":[],"guest_change_days":3},"schema":{"$ref":"#/components/schemas/BookingEngine"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}},"put":{"tags":["Booking engine"],"operationId":"putBookingEngine","summary":"Set up, change, switch on or off the booking engine","description":"Requires `write:catalog`. The whole document is sent each time. `slug` is the public address (`/book/<slug>`), 3 to 40 characters of\na-z, 0-9 and \"-\", unique on the whole server (capitals are made small); another organization's address is `409 slug_taken`. While\n`enabled` is false the address answers 404 to guests, like an address that never existed.\n","requestBody":{"required":true,"content":{"application/json":{"example":{"enabled":true,"slug":"villa-sunrise-8def","title":"Villa Sunrise","accent":"#0a7d5a","welcome":"Book direct and get a free breakfast.","cancellation_policy":"Free cancellation until 3 days before arrival.","terms":"Check-in from 2 pm, check-out until 11 am.","max_nights":14,"max_rooms":3,"advance_days":365,"min_advance_days":1,"same_day_until":"18:00","fees":[{"name":"VAT","kind":"percent","basis_points":1000},{"name":"Cleaning fee","kind":"per_stay","amount":2500}]},"schema":{"$ref":"#/components/schemas/BookingEngineInput"}}}},"responses":{"200":{"description":"Saved.","content":{"application/json":{"example":{"property_id":"66427eb8-549a-5488-90ca-7d10ee92bc4e","enabled":true,"slug":"villa-sunrise-8def","title":"Villa Sunrise","accent":"#0a7d5a","welcome":"Book direct and get a free breakfast.","cancellation_policy":"Free cancellation until 3 days before arrival.","terms":"Check-in from 2 pm, check-out until 11 am.","max_nights":14,"max_rooms":3,"advance_days":365,"min_advance_days":1,"same_day_until":"18:00","fees":[{"name":"VAT","kind":"percent","basis_points":1000,"included":false},{"name":"Cleaning fee","kind":"per_stay","amount":2500,"included":false}],"questions":[],"guest_change_days":3},"schema":{"$ref":"#/components/schemas/BookingEngine"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"}}}},"/book-api/{slug}/photos/{photo_id}":{"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}},{"name":"photo_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"tags":["Booking engine"],"operationId":"getBookingPhoto","summary":"A picture of the booking page (guests; no key)","description":"The picture itself. It never changes under its id, so it may be kept a long time. Not counted against the page-lookup limit. An unknown address or id answers `404`.","parameters":[{"name":"size","in":"query","required":false,"description":"`small` for a copy about 480 px wide (the picture itself when there is none).","schema":{"type":"string","enum":["small"]}}],"security":[],"responses":{"200":{"description":"The picture.","content":{"image/jpeg":{"schema":{"type":"string","format":"binary"}}}},"404":{"$ref":"#/components/responses/NotFound"}}}},"/book-api/{slug}/my-booking":{"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"post":{"tags":["Booking engine"],"operationId":"viewMyBooking","summary":"A guest sees their own booking (guests; no key)","description":"The link in the confirmation email carries a secret (`https://…/book/<slug>#manage=kmb_…`; it is after the `#`, so it never reaches a log). Sent here as `token`, it shows the booking, the hotel's\nquestions, and whether the guest may change or cancel it **now** (`can_change`), until what day (`change_until`) and, if not, why (`why_not`: `off` the hotel does not allow it online, `too_late` inside the\nhotel's window or the stay has begun, `cancelled`). Every wrong secret is the same `404 not_found`. Only bookings the hotel made itself (by hand or on its page) have one; a channel's booking does not.\n","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["token"],"properties":{"token":{"type":"string","description":"The secret of the link."}}}}}},"responses":{"200":{"description":"The booking, as a guest sees it.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/book-api/{slug}/my-booking-change":{"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"post":{"tags":["Booking engine"],"operationId":"changeMyBooking","summary":"A guest changes how they are reached and what they said (guests; no key)","description":"With the secret of the link, only while the hotel's window is open (see `my-booking`; otherwise `409 change_window_closed`, `change_not_allowed` or `already_cancelled`). A guest changes **their own details**:\n`name`, `phone`, `notes` and `answers` (the whole set, validated like when booking, `400 answers_invalid`). Fields left out stay as they are. **Dates, rooms, number of guests, the email address and the\nprice cannot be changed here**: they move rooms and prices and are the hotel's to move. The audit trail records that the guest changed their details, never to what.\n","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["token"],"properties":{"token":{"type":"string"},"name":{"type":"string","maxLength":120},"phone":{"type":"string","maxLength":40},"notes":{"type":"string","maxLength":2000},"answers":{"type":"object","additionalProperties":{"type":"string"}}}}}}},"responses":{"200":{"description":"The booking as it is now.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/book-api/{slug}/my-booking-cancel":{"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"post":{"tags":["Booking engine"],"operationId":"cancelMyBooking","summary":"A guest cancels their own booking (guests; no key)","description":"With the secret of the link, only while the hotel's window is open (see `my-booking`). The rooms go back on sale at once everywhere, the hotel is told like for any cancellation, and the guest is emailed\nthat it was cancelled. Cancelling twice is `409 already_cancelled`.\n","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["token"],"properties":{"token":{"type":"string"}}}}}},"responses":{"200":{"description":"The booking, cancelled.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/book-api/{slug}/my-booking-pay":{"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"post":{"tags":["Booking engine"],"operationId":"payMyBooking","summary":"A guest starts paying what they owe, on the hotel's own payment gateway (guests; no key)","description":"With the secret of the link. The amount is never the guest's to choose: it is what is still owed. The answer is the gateway's page to send the guest to; the guest comes back to their own page afterwards.\n`409 no_payment_connection` when the hotel takes no online payment, `409 nothing_owed` when it is paid, `502` when the gateway cannot be reached. The page's own answer (`my-booking`) says in `pay` whether paying online\nis offered (`online`), what is owed (`owed`) and the hotel's bank accounts for a guest who prefers a transfer (`banks`).\n","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["token"],"properties":{"token":{"type":"string"},"full":{"type":"boolean","description":"Pay everything owed, not only the deposit the hotel requires."}}}}}},"responses":{"201":{"description":"The page to pay on.","content":{"application/json":{"schema":{"type":"object","properties":{"checkout_url":{"type":"string"}}}}}},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"},"502":{"description":"The payment gateway refused the request or could not be reached."}}}},"/v1/properties/{id}/promo-codes":{"parameters":[{"$ref":"#/components/parameters/Id"}],"get":{"tags":["Booking engine"],"operationId":"listPromoCodes","summary":"List the promo codes of a property","description":"Requires `read:catalog`. The newest first, with how often each was used. Guests never see this list.","responses":{"200":{"description":"The codes.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PromoCode"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}},"post":{"tags":["Booking engine"],"operationId":"createPromoCode","summary":"Make a promo code","description":"Requires `write:catalog`. A guest types the code on the booking page and the stay costs less. `kind` is `percent` (`basis_points`, 1000 = 10.00%) or `amount` (`amount`, in the smallest unit of the\nproperty's currency, off the whole stay). The discount comes off the rooms; taxes and fees are worked out on what is left. Limits, all optional: `arrive_from` and `arrive_to` (the stay must\narrive in this period, inclusive), `min_nights` (default 1) and `max_uses` (how many bookings may use it). The code is kept in capitals, 3 to 20 letters, digits, `-` or `_`, and is unique in a\nproperty (`409 promo_code_exists`). At most 50 per property (`409 too_many_promo_codes`).\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromoCodeInput"}}}},"responses":{"201":{"description":"The code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromoCode"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"}}}},"/v1/promo-codes/{id}":{"parameters":[{"$ref":"#/components/parameters/Id"}],"put":{"tags":["Booking engine"],"operationId":"putPromoCode","summary":"Change what a promo code gives and limits","description":"Requires `write:catalog`. **Replaces** what the code gives and limits (the same fields as when it was made; what is left out goes back to its default). The code itself and how often it was used stay.\nSwitch a code off with `active: false` instead of deleting it: bookings already made keep what they were priced with.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromoCodeInput"}}}},"responses":{"200":{"description":"The code as saved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromoCode"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/book-api/{slug}":{"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"get":{"tags":["Booking engine"],"operationId":"getBookingPage","summary":"What the public booking page needs to draw itself (guests; no key)","description":"No authentication: the address is the way in. Open to any website (CORS `*`), so the widget can sit on the hotel's own site. Every\ncall counts against a limit per caller address (`429 too_many_attempts` with `Retry-After`). An address that is unknown, switched\noff or of a suspended organization answers the same `404`.\n","security":[],"responses":{"200":{"description":"Name, colour, texts, currency, today (in the property's time zone), the limits, and the rooms that can be booked.","content":{"application/json":{"example":{"accent":"#0a7d5a","advance_days":365,"cancellation_policy":"Free cancellation until 3 days before arrival.","currency":"USD","fees":[{"name":"VAT","kind":"percent","basis_points":1000,"included":false},{"name":"Cleaning fee","kind":"per_stay","amount":2500,"included":false}],"guest_change_days":3,"max_nights":14,"max_rooms":3,"min_advance_days":1,"questions":[],"rooms":[{"id":"dd2a27cc-c0cf-56b6-8aed-70a4dab3b427","name":"Suite","max_occupancy":4},{"id":"ab94a25e-5cef-5d1b-92c3-f0f9ddd9c53f","name":"Deluxe","max_occupancy":3}],"same_day_until":"18:00","terms":"Check-in from 2 pm, check-out until 11 am.","timezone":"Asia/Makassar","title":"Villa Sunrise","today":"2026-11-17","welcome":"Book direct and get a free breakfast."},"schema":{"type":"object","additionalProperties":true}}}},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/book-api/{slug}/quote":{"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"post":{"tags":["Booking engine"],"operationId":"quoteBookingStay","summary":"What each room would cost for the dates (guests; no key)","description":"Writes nothing. With `promo`, a valid code takes its discount off the rooms: it is the first of `lines`, negative, and the taxes and fees are worked out on what is left. For every room an offer: `bookable` is true only when it is free every night, priced every night, the guests fit **and the hotel's own rules allow the stay** (minimum or maximum stay, closed to arrival or departure, stop sell). Each offer carries `subtotal` (the rooms), `lines` (the hotel's taxes and fees, each added or only shown as included) and `total` (what the guest pays). A room that would sell but for such a rule carries `restriction` (`code`, `date`, `value`) so a guest can change the dates.\nHow many rooms are left is never told. The request is held to what the hotel allows (nights, rooms, how far ahead).\n","security":[],"requestBody":{"required":true,"content":{"application/json":{"example":{"arrival":"2027-03-11","departure":"2027-03-13","rooms":1,"adults":2},"schema":{"type":"object","required":["arrival","departure","rooms","adults"],"properties":{"arrival":{"type":"string","format":"date"},"departure":{"type":"string","format":"date"},"rooms":{"type":"integer","minimum":1},"adults":{"type":"integer","minimum":1},"children":{"type":"integer","minimum":0},"promo":{"type":"string","maxLength":20,"description":"A promo code the guest typed (capitals do not matter). Optional."}}}}}},"responses":{"200":{"description":"The offers. When a promo code was sent, `promo` says whether it was used (`applied`) and, if not, why - `refusal` (`unknown`, `not_for_dates`, `min_nights` with `min_nights`, or `used_up`) and `reason` in words a guest can act on. An unusable code leaves the price as it is.","content":{"application/json":{"example":{"arrival":"2027-03-11","departure":"2027-03-13","offers":[{"room_type_id":"dd2a27cc-c0cf-56b6-8aed-70a4dab3b427","bookable":false,"total":null,"currency":"USD","lines":[]},{"room_type_id":"ab94a25e-5cef-5d1b-92c3-f0f9ddd9c53f","bookable":true,"total":28900,"currency":"USD","per_night":[12000,12000],"subtotal":24000,"lines":[{"name":"VAT","amount":2400,"included":false},{"name":"Cleaning fee","amount":2500,"included":false}]}],"rooms":1},"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/book-api/{slug}/reservations":{"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"post":{"tags":["Booking engine"],"operationId":"bookRoom","summary":"Book a room, to be paid at the property (guests; no key)","description":"The booking is confirmed at once and takes its rooms off sale everywhere, like a booking the hotel makes itself, and the guest is\nemailed. `token` (8 to 100 characters) is made up by the page once for each attempt: pressing the button twice, or a retry, returns\nthe first booking (`200` instead of `201`) and sends no second email. Held to a limit per caller address and per guest email.\nThe answer carries `subtotal` (the rooms), `lines` (taxes and fees) and `total` (what the guest pays), and `manage_token`, the secret of the guest's own page, only in the answer that made the booking (when the hotel lets guests change a booking themselves, or takes online payment, which `pay_online` says; a retry cannot give it again). `pay_online` says whether the guest may pay on the hotel's gateway; `pay_due` (`amount`, `until`) is the deposit the hotel's terms require and its last moment, and `pay_banks` the bank accounts, one line each. A promo code that cannot be used (unknown, switched off, outside its dates, too short a stay, used up) refuses the booking with `409 promo_invalid` and books nothing. A room that is gone is `409 no_availability`; a stay that breaks the hotel's rules (a minimum stay, a closed day) is `409 not_sellable`, with a message the guest can act on. The field `website` is for robots: a person never sees it, and a booking that fills it is\ntold it worked and nothing is booked.\n","security":[],"requestBody":{"required":true,"content":{"application/json":{"example":{"room_type_id":"ab94a25e-5cef-5d1b-92c3-f0f9ddd9c53f","arrival":"2027-03-11","departure":"2027-03-13","rooms":1,"adults":2,"token":"189b165b-331c-55bc-8eb0-109a192eecc8","locale":"en","guest":{"name":"Maria Silva","email":"maria.silva@example.com","phone":"+55 11 5550 0123"},"notes":"Quiet room please","website":""},"schema":{"type":"object","required":["room_type_id","arrival","departure","rooms","adults","token","guest"],"properties":{"room_type_id":{"type":"string","format":"uuid"},"arrival":{"type":"string","format":"date"},"departure":{"type":"string","format":"date"},"rooms":{"type":"integer","minimum":1},"adults":{"type":"integer","minimum":1},"children":{"type":"integer","minimum":0},"token":{"type":"string","minLength":8,"maxLength":100},"locale":{"type":"string","example":"en"},"notes":{"type":"string","maxLength":2000},"promo":{"type":"string","maxLength":20,"description":"A promo code the guest typed (capitals do not matter). Optional."},"answers":{"type":"object","additionalProperties":{"type":"string"},"description":"The answers to the hotel's questions, by question id (`{\"q1\": \"about 3 pm\"}`). Every required question must be answered, a choice must be one of its options (`400 answers_invalid`)."},"website":{"type":"string"},"guest":{"type":"object","required":["name","email"],"properties":{"name":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"country":{"type":"string"}}}}}}}},"responses":{"200":{"description":"This attempt was already booked; the same booking.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"201":{"description":"Booked. `email_sent` says whether the confirmation could be sent.","content":{"application/json":{"example":{"arrival":"2027-03-11","currency":"USD","departure":"2027-03-13","email_sent":true,"lines":[{"name":"VAT","amount":2400,"included":false},{"name":"Cleaning fee","amount":2500,"included":false}],"manage_token":"kmb_5b472473f24c56a1a1239b2101db8578","pay":"at_property","reference":"KN-LR8X5R","room":"Deluxe","rooms":1,"status":"confirmed","subtotal":24000,"total":28900},"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/hooks/{token}":{"post":{"tags":["Channel messages"],"operationId":"receiveChannelWebhook","summary":"Where a channel posts reservations (not for API clients)","description":"The token in the path is the credential; there is no other authentication. The body is whatever the channel\nsends. It is read, stripped of card data, stored, and answered **200** for everything that could be stored,\nincluding events Antero Connect does not know and bodies it cannot read (a vendor that sees errors may switch its\nwebhook off). A token that is unknown, wrong, revoked or malformed answers the same 404.\n","security":[],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"*/*":{"schema":{}}}},"responses":{"200":{"description":"Stored.","content":{"application/json":{"schema":{"type":"object","required":["status"],"properties":{"status":{"type":"string","enum":["stored"]}}}}}},"404":{"$ref":"#/components/responses/NotFound"},"413":{"description":"The body is larger than 1 MB."}}}},"/v1/properties/{id}/reservations":{"parameters":[{"$ref":"#/components/parameters/Id"}],"get":{"tags":["Reservations"],"operationId":"listReservations","summary":"Reservations of a property","description":"Requires `read:reservations`. Reservations come from channels (`source: channel`) or are made by the hotel itself (`source: manual`, see the POST below).\n`pending` means Antero Connect could not complete it without guessing, and says why in `pending_reason`\n(`unmapped_room`, `unmapped_rate`, `no_price`, `bad_dates`, `bad_nights`, `bad_currency`); it completes by\nitself once the cause is gone (for instance after the mapping is added). Guest contact data is included only\nfor keys that also carry `read:reservations.personal`.\n","parameters":[{"name":"status","in":"query","schema":{"type":"string","enum":["pending","confirmed","cancelled"]}},{"name":"connection_id","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"arrival_from","in":"query","schema":{"type":"string","format":"date"}},{"name":"arrival_to","in":"query","schema":{"type":"string","format":"date"}},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/After"}],"responses":{"200":{"description":"A page of reservations.","content":{"application/json":{"example":{"data":[{"id":"70c07ff5-0c9e-53af-ae3b-09ca64488642","property_id":"66427eb8-549a-5488-90ca-7d10ee92bc4e","connection_id":null,"source":"manual","booked_via":"staff","notes":"Late arrival, after 10 pm","payment_status":"deposit","external_id":"KN-EFANW6","status":"confirmed","pending_reason":null,"room_type_id":"ab94a25e-5cef-5d1b-92c3-f0f9ddd9c53f","rate_plan_id":"5b04a6c7-8418-5453-b9f5-dddde5a4d190","arrival":"2027-03-11","departure":"2027-03-13","stay_nights":2,"rooms":1,"adults":2,"children":0,"currency":"USD","total_amount":24000,"nights_derived":false,"collected_by":"hotel","collected_by_assumed":false,"booked_at":"2027-03-01T09:04:00Z","cancelled_at":null,"checked_in_at":null,"checked_out_at":null,"no_show_at":null,"first_received_at":"2027-03-01T09:04:00Z","updated_at":"2027-03-01T09:05:00Z","placement":null,"guest":{"name":"Ana Lee","email":"ana.lee@example.com","phone":"+1 555 0100","country":"US"}}],"next_cursor":null},"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Reservation"}},"next_cursor":{"type":["string","null"]}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}},"post":{"tags":["Reservations"],"operationId":"createReservation","summary":"Book a stay the hotel takes itself","description":"Requires `write:reservations`. The rooms are taken off sale at once, for every night. Two bookings can never take the last room: the second\nanswers `409 no_availability`. What happens next depends on who runs the room count (`authority_mode`):\nin `channel_manager_authoritative` Antero Connect gives the rooms back itself when the reservation is cancelled or changed; in `pms_authoritative` the booking goes to the\nhotel's own software like a channel reservation does: it is in the numbered `reservation-feed` (as `created`), its holds are only raised, and only the\nsoftware's confirmation (`feed_applied_through`) releases them. Without `total_amount` the stay is priced from the rates of the rate plan (the room\ntype's first active one if none is named); a night without a price answers `409 no_price`. With `total_amount` (smallest unit, whole stay, all rooms)\nthe nights are spread evenly and `nights_derived` is true. The reference (`external_id`, like `KN-4F7Q2B`) is made by Antero Connect. The guest is stored as\nsent; it is returned only to keys that also carry `read:reservations.personal`. Repeat the call safely with the same `Idempotency-Key`.\n","requestBody":{"required":true,"content":{"application/json":{"example":{"room_type_id":"ab94a25e-5cef-5d1b-92c3-f0f9ddd9c53f","arrival":"2027-03-11","departure":"2027-03-13","rooms":1,"adults":2,"children":0,"guest":{"name":"Ana Lee","email":"ana.lee@example.com","phone":"+1 555 0100","country":"US"},"notes":"Late arrival, after 10 pm","payment_status":"deposit"},"schema":{"$ref":"#/components/schemas/ReservationCreate"}}}},"responses":{"201":{"description":"The reservation, confirmed.","content":{"application/json":{"example":{"id":"70c07ff5-0c9e-53af-ae3b-09ca64488642","property_id":"66427eb8-549a-5488-90ca-7d10ee92bc4e","connection_id":null,"source":"manual","booked_via":"staff","notes":"Late arrival, after 10 pm","payment_status":"deposit","external_id":"KN-EFANW6","status":"confirmed","pending_reason":null,"room_type_id":"ab94a25e-5cef-5d1b-92c3-f0f9ddd9c53f","rate_plan_id":"5b04a6c7-8418-5453-b9f5-dddde5a4d190","arrival":"2027-03-11","departure":"2027-03-13","stay_nights":2,"rooms":1,"adults":2,"children":0,"currency":"USD","total_amount":24000,"nights_derived":false,"collected_by":"hotel","collected_by_assumed":false,"booked_at":"2027-03-01T09:04:00Z","cancelled_at":null,"checked_in_at":null,"checked_out_at":null,"no_show_at":null,"first_received_at":"2027-03-01T09:04:00Z","updated_at":"2027-03-01T09:05:00Z","placement":null,"guest":{"name":"Ana Lee","email":"ana.lee@example.com","phone":"+1 555 0100","country":"US"},"nights":[{"date":"2027-03-11","amount":12000},{"date":"2027-03-12","amount":12000}],"room_lines":[{"index":1,"room_type_id":"ab94a25e-5cef-5d1b-92c3-f0f9ddd9c53f","rate_plan_id":"5b04a6c7-8418-5453-b9f5-dddde5a4d190"}]},"schema":{"$ref":"#/components/schemas/Reservation"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"}}}},"/v1/reservations/{id}":{"parameters":[{"$ref":"#/components/parameters/Id"}],"get":{"tags":["Reservations"],"operationId":"getReservation","summary":"One reservation with its nights, rooms and revisions","description":"Requires `read:reservations` (and `read:reservations.personal` for the guest). `revisions` is the history:\none entry per message from the channel; `applied: false` marks one that was older than the state that\nalready applied and so changed nothing. Amounts are integers in the smallest unit of `currency`.\n","responses":{"200":{"description":"The reservation.","content":{"application/json":{"example":{"id":"70c07ff5-0c9e-53af-ae3b-09ca64488642","property_id":"66427eb8-549a-5488-90ca-7d10ee92bc4e","connection_id":null,"source":"manual","booked_via":"staff","notes":"Late arrival, after 10 pm","payment_status":"deposit","external_id":"KN-EFANW6","status":"confirmed","pending_reason":null,"room_type_id":"ab94a25e-5cef-5d1b-92c3-f0f9ddd9c53f","rate_plan_id":"5b04a6c7-8418-5453-b9f5-dddde5a4d190","arrival":"2027-03-11","departure":"2027-03-13","stay_nights":2,"rooms":1,"adults":2,"children":0,"currency":"USD","total_amount":24000,"nights_derived":false,"collected_by":"hotel","collected_by_assumed":false,"booked_at":"2027-03-01T09:04:00Z","cancelled_at":null,"checked_in_at":null,"checked_out_at":null,"no_show_at":null,"first_received_at":"2027-03-01T09:04:00Z","updated_at":"2027-03-01T09:05:00Z","placement":null,"guest":{"name":"Ana Lee","email":"ana.lee@example.com","phone":"+1 555 0100","country":"US"},"nights":[{"date":"2027-03-11","amount":12000},{"date":"2027-03-12","amount":12000}],"room_lines":[{"index":1,"room_type_id":"ab94a25e-5cef-5d1b-92c3-f0f9ddd9c53f","rate_plan_id":"5b04a6c7-8418-5453-b9f5-dddde5a4d190"}]},"schema":{"$ref":"#/components/schemas/Reservation"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}},"patch":{"tags":["Reservations"],"operationId":"updateReservation","summary":"Change a reservation the hotel made itself","description":"Requires `write:reservations`. Only for `source: manual`: a reservation from a channel is changed by its channel (`409 channel_reservation`),\na cancelled one cannot be changed (`409 reservation_cancelled`). Leave out what stays. A change of dates, room type or number of rooms\nmoves the held rooms with it and prices the stay again (from the rates, or from `total_amount`); it never competes with its own old\nrooms, and a change that does not fit answers `409 no_availability` and changes nothing. In a property run by its own software the change is announced in the\nfeed (`modified`) and the old rooms come back when the software confirms.\n","requestBody":{"required":true,"content":{"application/json":{"example":{"departure":"2027-03-14","notes":"Late arrival, after 10 pm. Extra bed requested."},"schema":{"$ref":"#/components/schemas/ReservationUpdate"}}}},"responses":{"200":{"description":"The reservation after the change.","content":{"application/json":{"example":{"id":"70c07ff5-0c9e-53af-ae3b-09ca64488642","property_id":"66427eb8-549a-5488-90ca-7d10ee92bc4e","connection_id":null,"source":"manual","booked_via":"staff","notes":"Late arrival, after 10 pm. Extra bed requested.","payment_status":"deposit","external_id":"KN-EFANW6","status":"confirmed","pending_reason":null,"room_type_id":"ab94a25e-5cef-5d1b-92c3-f0f9ddd9c53f","rate_plan_id":"5b04a6c7-8418-5453-b9f5-dddde5a4d190","arrival":"2027-03-11","departure":"2027-03-14","stay_nights":3,"rooms":1,"adults":2,"children":0,"currency":"USD","total_amount":36000,"nights_derived":false,"collected_by":"hotel","collected_by_assumed":false,"booked_at":"2027-03-01T09:04:00Z","cancelled_at":null,"checked_in_at":null,"checked_out_at":null,"no_show_at":null,"first_received_at":"2027-03-01T09:04:00Z","updated_at":"2027-03-01T09:06:00Z","placement":null,"guest":{"name":"Ana Lee","email":"ana.lee@example.com","phone":"+1 555 0100","country":"US"},"nights":[{"date":"2027-03-11","amount":12000},{"date":"2027-03-12","amount":12000},{"date":"2027-03-13","amount":12000}],"room_lines":[{"index":1,"room_type_id":"ab94a25e-5cef-5d1b-92c3-f0f9ddd9c53f","rate_plan_id":"5b04a6c7-8418-5453-b9f5-dddde5a4d190"}]},"schema":{"$ref":"#/components/schemas/Reservation"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"}}}},"/v1/payment-gateways":{"get":{"tags":["Payments"],"operationId":"listPaymentGateways","summary":"The payment gateways a hotel can bring its own account of","description":"Requires `read:catalog`. Each gateway says which countries and currencies it serves, what it is called, and the `fields` a hotel must give to connect its account\n(the panel draws its form from them). A pretend gateway for trying things out is listed everywhere except on a production server.\n","responses":{"200":{"description":"The gateways, by name.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"}}}},"/v1/properties/{id}/payment-connections":{"parameters":[{"$ref":"#/components/parameters/Id"}],"get":{"tags":["Payments"],"operationId":"listPaymentConnections","summary":"The payment gateways a property takes payments through","description":"Requires `read:catalog`. Never the credentials: only whether they exist and a fingerprint. A caller who may also change connections (`write:catalog`) sees each one's\n`hook_url`, the address the gateway is to send its messages to (pasted into the gateway's dashboard where it must be told).\n","responses":{"200":{"description":"The connections.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PaymentConnection"}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}},"post":{"tags":["Payments"],"operationId":"createPaymentConnection","summary":"Connect the hotel's own payment gateway account","description":"Requires `write:catalog`. The money goes straight to the hotel's own account at the gateway: Antero Connect never holds it and never sees a card (the guest pays on the\ngateway's hosted page). `credentials` has exactly the fields the gateway names in `GET /v1/payment-gateways`; they are sealed and never shown again. A connection is a\n**sandbox** unless it says `\"sandbox\": false`, and a pretend gateway can only be a sandbox. The answer carries `hook_url`.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"required":["gateway","credentials"]}}}},"responses":{"201":{"description":"Connected.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentConnection"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"}}}},"/v1/payment-connections/{id}":{"parameters":[{"$ref":"#/components/parameters/Id"}],"patch":{"tags":["Payments"],"operationId":"patchPaymentConnection","summary":"Rename, pause or resume a payment connection, or replace its credentials","description":"Requires `write:catalog`. A paused connection takes no new payments and its callback address answers 404.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"Changed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentConnection"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"}}},"delete":{"tags":["Payments"],"operationId":"deletePaymentConnection","summary":"Remove a payment connection that was never used","description":"Requires `write:catalog`. A connection with payments is `409 connection_in_use`: the payments are records of money, so pause it instead.","responses":{"200":{"description":"Removed.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"}}}},"/v1/payment-connections/{id}/test":{"parameters":[{"$ref":"#/components/parameters/Id"}],"post":{"tags":["Payments"],"operationId":"testPaymentConnection","summary":"Ask the gateway whether the credentials work","description":"Requires `write:catalog`. Makes no payment. `502 gateway_auth_failed` when the gateway refuses the credentials, `502 gateway_unavailable` when it cannot be reached.","responses":{"200":{"description":"The credentials work.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"},"502":{"description":"The gateway refused the credentials or could not be reached."}}}},"/v1/payment-connections/{id}/test-payment":{"parameters":[{"$ref":"#/components/parameters/Id"}],"post":{"tags":["Payments"],"operationId":"startTestPayment","summary":"Make a small test payment that proves the connection end to end","description":"Requires `write:catalog`. A payment that belongs to no reservation, of a small fixed amount: the hotel pays it itself on the gateway's page, and the message that comes back proves the keys, the checkout and the callback address. A live connection makes a real small charge, so it needs `live: true`.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"success_url":{"type":"string"},"cancel_url":{"type":"string"},"live":{"type":"boolean","description":"Confirm that a live account is charged a small real amount."}}}}}},"responses":{"201":{"description":"The payment page to open.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Payment"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"},"502":{"description":"The gateway refused the request or could not be reached."}}},"get":{"tags":["Payments"],"operationId":"getTestPayment","summary":"The newest test payment of the connection","description":"Requires `read:catalog`. While it is still pending the gateway is asked what became of it, so a screen can poll this until it says `paid`. `404` when none was made.","responses":{"200":{"description":"The payment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Payment"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/properties/{id}/bank-accounts":{"parameters":[{"$ref":"#/components/parameters/Id"}],"get":{"tags":["Payments"],"operationId":"listBankAccounts","summary":"The hotel's bank accounts for guests who pay by bank transfer","description":"Requires `read:catalog`. Oldest first; an account switched off (`inactive`) is listed too but is not offered to guests.","responses":{"200":{"description":"The accounts.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BankAccount"}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}},"post":{"tags":["Payments"],"operationId":"createBankAccount","summary":"Add a bank account","description":"Requires `write:catalog`. At most 10 a property (`409 bank_account_limit`).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["bank","holder","number"],"properties":{"bank":{"type":"string","maxLength":80},"holder":{"type":"string","maxLength":80},"number":{"type":"string","maxLength":60},"note":{"type":"string","maxLength":300,"description":"Shown to the guest with the account","for example the reference to write.":null}}}}}},"responses":{"201":{"description":"The account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankAccount"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/bank-accounts/{id}":{"parameters":[{"$ref":"#/components/parameters/Id"}],"patch":{"tags":["Payments"],"operationId":"updateBankAccount","summary":"Change a bank account, or switch it off","description":"Requires `write:catalog`. Send only what changes; `status` set to `inactive` stops the account being offered without losing it.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"bank":{"type":"string"},"holder":{"type":"string"},"number":{"type":"string"},"note":{"type":"string"},"status":{"type":"string","enum":["active","inactive"]}}}}}},"responses":{"200":{"description":"The account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankAccount"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}},"delete":{"tags":["Payments"],"operationId":"deleteBankAccount","summary":"Remove a bank account","description":"Requires `write:catalog`. Transfers already recorded keep their amounts; they do not refer to the account.","responses":{"200":{"description":"Removed.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/reservations/{id}/transfers":{"parameters":[{"$ref":"#/components/parameters/Id"}],"get":{"tags":["Payments"],"operationId":"listTransfers","summary":"The bank transfers recorded on a reservation","description":"Requires `read:reservations`. Oldest first.","responses":{"200":{"description":"The transfers.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Transfer"}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}},"post":{"tags":["Payments"],"operationId":"createTransfer","summary":"Record a bank transfer on a reservation","description":"Requires `write:reservations`. Only the hotel's own confirmed reservation with a price (`409 transfer_not_allowed`), and not more than is owed (`409 nothing_owed` when it is paid). It waits to be confirmed, unless `received` is true (staff have seen the money): then it counts at once. A confirmed transfer sets the reservation's `payment_status` the way a gateway payment does.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["amount"],"properties":{"amount":{"type":"integer","minimum":1,"description":"The smallest unit of the reservation's currency."},"note":{"type":"string","maxLength":300},"received":{"type":"boolean"},"method":{"type":"string","enum":["bank_transfer","cash","card","other"],"description":"How it was paid; default `bank_transfer`. Cash and card are in the hand, so they count at once (`received` is taken as true)."}}}}}},"responses":{"201":{"description":"The transfer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Transfer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"`transfer_not_allowed` or `nothing_owed`."}}}},"/v1/transfers/{id}/confirm":{"parameters":[{"$ref":"#/components/parameters/Id"}],"post":{"tags":["Payments"],"operationId":"confirmTransfer","summary":"The money is in the bank","description":"Requires `write:reservations`. Counts the transfer as paid and updates the reservation's `payment_status`. Confirming twice is the same as once; a rejected transfer cannot be confirmed (`409 transfer_rejected`).","responses":{"200":{"description":"The transfer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Transfer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"`transfer_rejected`."}}}},"/v1/transfers/{id}/reject":{"parameters":[{"$ref":"#/components/parameters/Id"}],"post":{"tags":["Payments"],"operationId":"rejectTransfer","summary":"The money did not arrive","description":"Requires `write:reservations`. A transfer that was confirmed can be rejected too; the reservation's `payment_status` follows.","responses":{"200":{"description":"The transfer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Transfer"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/transfers/{id}/proof":{"parameters":[{"$ref":"#/components/parameters/Id"}],"put":{"tags":["Payments"],"operationId":"putTransferProof","summary":"Keep the picture of the receipt with a transfer","description":"Requires `write:reservations`. The body is the picture itself (JPEG, PNG or WebP, at most 1.5 MB), told by its first bytes.","requestBody":{"required":true,"content":{"image/jpeg":{"schema":{"type":"string","format":"binary"}}}},"responses":{"200":{"description":"The transfer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Transfer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"},"413":{"description":"The picture is over 1.5 MB."}}},"get":{"tags":["Payments"],"operationId":"getTransferProof","summary":"The picture of the receipt","description":"Requires `read:reservations`. `404` when there is none.","responses":{"200":{"description":"The picture.","content":{"image/jpeg":{"schema":{"type":"string","format":"binary"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/reservations/{id}/payments":{"parameters":[{"$ref":"#/components/parameters/Id"}],"get":{"tags":["Payments"],"operationId":"listPayments","summary":"The payments made, or being made, for a reservation","description":"Requires `read:reservations`. Oldest first. A reservation's `payment_status` follows them: `paid` when what is paid covers the price, `deposit` when some is, `unpaid` otherwise.","responses":{"200":{"description":"The payments.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Payment"}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}},"post":{"tags":["Payments"],"operationId":"startPayment","summary":"Make a payment page for a reservation (a payment link)","description":"Requires `write:reservations`. Asks the gateway for a hosted page for `deposit` (a `percent` of the price, 30 by default), `balance` or `full` (what is still owed), or `custom`\n(an `amount` of at most what is owed). The guest pays on that page (`checkout_url`); the gateway then tells Antero Connect, signed, and the payment becomes `paid`.\nIf the property has several active connections say which with `connection_id`. Only a confirmed reservation with a price can be paid for online.\n","requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"201":{"description":"The payment, waiting for the guest.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Payment"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"502":{"description":"The gateway refused the request or could not be reached. The attempt is kept","as `failed`.":null}}}},"/v1/payments/{id}/refresh":{"parameters":[{"$ref":"#/components/parameters/Id"}],"post":{"tags":["Payments"],"operationId":"refreshPayment","summary":"Ask the gateway what became of a payment","description":"Requires `write:reservations`. The safety net for a message that never came: a payment still pending is looked up at the gateway and updated.","responses":{"200":{"description":"The payment as it is now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Payment"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"},"502":{"description":"The gateway could not be reached."}}}},"/pay-hooks/{token}":{"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"post":{"tags":["Payments"],"operationId":"receivePaymentHook","summary":"Where a payment gateway tells us what happened (gateways only)","description":"No key: the address is the way in, and the message must carry the gateway's own signature. An address that is unknown, paused or of a suspended organization answers 404;\na message that is not signed by the gateway answers `400 bad_signature` and changes nothing; a message about nothing of ours is `200`. The same message twice changes nothing the second time.\n","security":[],"responses":{"200":{"description":"Taken (or ignored on purpose)."},"400":{"description":"The signature is not valid."},"404":{"$ref":"#/components/responses/NotFound"}}}},"/pay/duitku/callback":{"post":{"tags":["Payments"],"operationId":"receiveDuitkuCallback","summary":"Where Duitku tells us a top-up was paid (Duitku only)","description":"No key: a form post (`application/x-www-form-urlencoded`) from Duitku with `merchantCode`, `amount`, `merchantOrderId`, `resultCode`, `reference` and `signature`, where\n`signature` is HMAC-SHA256 of `merchantCode + amount + merchantOrderId` with the project's API key. A call that is not signed that way answers `400 invalid_signature` and changes nothing. A signed call\nwith `resultCode` `00` adds the amount to the balance of the organization the order belongs to, once (the same order twice changes nothing the second time); any other result, and an order of\nnothing of ours, is answered `200` so that Duitku stops asking. A server without a Duitku project answers 404.\n","security":[],"responses":{"200":{"description":"Taken, or ignored on purpose (the body is `OK`)."},"400":{"description":"The signature is not valid."},"404":{"$ref":"#/components/responses/NotFound"},"500":{"description":"The credit could not be recorded; Duitku sends it again."}}}},"/pay/doku/notification":{"post":{"tags":["Payments"],"operationId":"receiveDokuNotification","summary":"Where DOKU tells us a top-up was paid (DOKU only)","description":"No key: a JSON `POST` from DOKU with the headers `Client-Id`, `Request-Id`, `Request-Timestamp` and `Signature`. `Signature` is `HMACSHA256=` and the base64 of the HMAC-SHA256, keyed with the account's Secret Key, of five lines:\n`Client-Id:<..>`, `Request-Id:<..>`, `Request-Timestamp:<..>`, `Request-Target:/pay/doku/notification` and `Digest:<base64 of the SHA-256 of the body>`. A call that is not signed that way, or whose timestamp is more than 15 minutes from now,\nanswers `400 invalid_signature` and changes nothing. A signed call with `transaction.status` `SUCCESS` adds the amount of the order to the balance of its organization, once, and only when `order.amount` is the amount we asked\nfor; any other status, an amount that differs and an order of nothing of ours are answered `200` so that DOKU stops asking. A server without a DOKU account answers 404.\n","security":[],"responses":{"200":{"description":"Taken, or ignored on purpose (the body is `OK`)."},"400":{"description":"The signature is not valid."},"404":{"$ref":"#/components/responses/NotFound"},"500":{"description":"The credit could not be recorded; DOKU sends it again."}}}},"/pay/doku/return":{"get":{"tags":["Payments"],"operationId":"returnFromDoku","summary":"Where DOKU sends the person back after paying","description":"A redirect (303) to the panel's billing page, passing on the order id when it has the shape of ours. It shows and never believes: only the signed notification pays.\n","security":[],"parameters":[{"name":"order","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"303":{"description":"To the panel."}}}},"/pay/duitku/return":{"get":{"tags":["Payments"],"operationId":"returnFromDuitku","summary":"Where Duitku sends the person back after paying","description":"A redirect (303) to the panel's billing page, passing on the order id when it has the shape of ours. It shows and never believes: the address can be edited by hand, so\nnothing is paid here (only the signed callback pays).\n","security":[],"parameters":[{"name":"merchantOrderId","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"303":{"description":"To the panel."}}}},"/v1/exports/xlsx":{"post":{"tags":["Reservations"],"operationId":"exportXlsx","summary":"Write tables as an Excel workbook (one sheet per table)","description":"Requires `read:reservations`. The panel's reports send the tables they worked out and get a `.xlsx` back, with a bold frozen header, filters, column widths, and numbers,\nmoney, percentages and dates as real Excel values. Up to 12 sheets, 60 columns, 100,000 rows in all, 24 MB. A column has a `type`: `text`, `integer`, `number`,\n`money` (with `decimals`, 2 or 0 for a currency without decimals), `percent` (a fraction: 0.25 is 25%), `date` (`YYYY-MM-DD`) or `datetime` (RFC 3339). A cell can also be\n`{\"v\": 12.5, \"type\": \"money\", \"decimals\": 2}` to type that one cell. A sheet can also carry `charts`: `{\"type\": \"col\"|\"line\"|\"bar\", \"title\": \"...\", \"category\": 1, \"values\": [5], \"anchor\": \"K3\"}`, drawn from that sheet's own columns (counted from 1) over all its rows, up to 4 series each; a chart that points at a missing column is left out. A sheet name is shortened to 31 characters, stripped of `[ ] : * ? / \\\\`, and made unique.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"The workbook.","content":{"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"413":{"description":"The tables are bigger than 24 MB."}}}},"/v1/properties/{id}/room-numbers":{"parameters":[{"$ref":"#/components/parameters/Id"}],"get":{"tags":["Reservations"],"operationId":"listRoomNumbers","summary":"The real rooms of a property, by number","description":"Requires `read:catalog`. For a hotel with no PMS (`channel_manager_authoritative`). With `arrival` and `departure` together each room also says `free`: whether no\nother reservation has it on any night of those dates. `exclude_reservation` leaves one reservation out of that, so a reservation sees its own room as free.\n","parameters":[{"name":"arrival","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"departure","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"exclude_reservation","in":"query","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"The rooms, in the order a person reads the numbers (2 before 10).","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}},"post":{"tags":["Reservations"],"operationId":"addRoomNumbers","summary":"Add rooms to a room type","description":"Requires `write:catalog`. 1 to 200 numbers (text, at most 20 characters, trimmed; one repeated in the list counts once). A number that already exists in the property\nrefuses the whole request with `409 room_number_taken`. A property whose rooms are kept by its PMS answers `409 rooms_kept_by_pms`.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"201":{"description":"The rooms added.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"}}}},"/v1/properties/{id}/room-numbers/{number_id}":{"parameters":[{"$ref":"#/components/parameters/Id"},{"name":"number_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"delete":{"tags":["Reservations"],"operationId":"deleteRoomNumber","summary":"Remove a room","description":"Requires `write:catalog`. A room with a guest today or later is `409 room_in_use`; give those reservations another room first. Past stays only lose their room label.","responses":{"200":{"description":"Removed.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"}}}},"/v1/reservations/{id}/rooms":{"parameters":[{"$ref":"#/components/parameters/Id"}],"put":{"tags":["Reservations"],"operationId":"setReservationRooms","summary":"Give a reservation its real rooms","description":"Requires `write:reservations`. The whole list is sent each time (an empty list lets all rooms go). Each room must be of the reservation's room type and at most as many\nas the reservation has rooms. **A room is never given to two guests on the same night**: one that another reservation has on any night of the stay is `409 room_taken`\n(the message names the room and the holder), and nothing changes. The night of departure is free for the next guest. The rooms follow the reservation: they are\nlet go when it is cancelled or its room type changes, and when new dates clash with another guest in the same room. Only for `channel_manager_authoritative` (`409 rooms_kept_by_pms`).\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"responses":{"200":{"description":"The reservation with its `room_numbers`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Reservation"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"}}}},"/v1/reservations/{id}/cancel":{"parameters":[{"$ref":"#/components/parameters/Id"}],"post":{"tags":["Reservations"],"operationId":"cancelReservation","summary":"Cancel a reservation the hotel made itself","description":"Requires `write:reservations`. Gives the rooms back at once where Antero Connect runs the room count; where the hotel's own software does, the cancellation is announced in the feed (`cancelled`) and the rooms come back when the software confirms. Cancelling twice is the same as once. A reservation from a channel is\ncancelled by its channel (`409 channel_reservation`).\n","responses":{"200":{"description":"The reservation, cancelled.","content":{"application/json":{"example":{"id":"70c07ff5-0c9e-53af-ae3b-09ca64488642","property_id":"66427eb8-549a-5488-90ca-7d10ee92bc4e","connection_id":null,"source":"manual","booked_via":"staff","notes":"Late arrival, after 10 pm. Extra bed requested.","payment_status":"deposit","external_id":"KN-EFANW6","status":"cancelled","pending_reason":null,"room_type_id":"ab94a25e-5cef-5d1b-92c3-f0f9ddd9c53f","rate_plan_id":"5b04a6c7-8418-5453-b9f5-dddde5a4d190","arrival":"2027-03-11","departure":"2027-03-14","stay_nights":3,"rooms":1,"adults":2,"children":0,"currency":"USD","total_amount":36000,"nights_derived":false,"collected_by":"hotel","collected_by_assumed":false,"booked_at":"2027-03-01T09:04:00Z","cancelled_at":"2027-03-01T09:14:00Z","checked_in_at":"2027-03-01T09:09:00Z","checked_out_at":null,"no_show_at":null,"first_received_at":"2027-03-01T09:04:00Z","updated_at":"2027-03-01T09:15:00Z","placement":null,"guest":{"name":"Ana Lee","email":"ana.lee@example.com","phone":"+1 555 0100","country":"US"},"nights":[{"date":"2027-03-11","amount":12000},{"date":"2027-03-12","amount":12000},{"date":"2027-03-13","amount":12000}],"room_lines":[{"index":1,"room_type_id":"ab94a25e-5cef-5d1b-92c3-f0f9ddd9c53f","rate_plan_id":"5b04a6c7-8418-5453-b9f5-dddde5a4d190"}]},"schema":{"$ref":"#/components/schemas/Reservation"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"}}}},"/v1/reservations/{id}/check-in":{"parameters":[{"$ref":"#/components/parameters/Id"}],"post":{"tags":["Reservations"],"operationId":"checkInReservation","summary":"Record that the guest arrived","description":"Requires `write:reservations`. Works for any reservation, whoever made it. It only keeps the front desk's record (`checked_in_at`): it never moves rooms, holds or anything a channel sees. Doing it twice keeps the first time. A guest already marked as not coming is no longer a no-show. `409 stay_out_of_order` once the guest has left; `409 reservation_not_confirmed` for a cancelled or incomplete reservation.\n","responses":{"200":{"description":"The reservation, with the stay as it is now.","content":{"application/json":{"example":{"id":"70c07ff5-0c9e-53af-ae3b-09ca64488642","property_id":"66427eb8-549a-5488-90ca-7d10ee92bc4e","connection_id":null,"source":"manual","booked_via":"staff","notes":"Late arrival, after 10 pm. Extra bed requested.","payment_status":"deposit","external_id":"KN-EFANW6","status":"confirmed","pending_reason":null,"room_type_id":"ab94a25e-5cef-5d1b-92c3-f0f9ddd9c53f","rate_plan_id":"5b04a6c7-8418-5453-b9f5-dddde5a4d190","arrival":"2027-03-11","departure":"2027-03-14","stay_nights":3,"rooms":1,"adults":2,"children":0,"currency":"USD","total_amount":36000,"nights_derived":false,"collected_by":"hotel","collected_by_assumed":false,"booked_at":"2027-03-01T09:04:00Z","cancelled_at":null,"checked_in_at":"2027-03-01T09:09:00Z","checked_out_at":null,"no_show_at":null,"first_received_at":"2027-03-01T09:04:00Z","updated_at":"2027-03-01T09:10:00Z","placement":null,"guest":{"name":"Ana Lee","email":"ana.lee@example.com","phone":"+1 555 0100","country":"US"},"nights":[{"date":"2027-03-11","amount":12000},{"date":"2027-03-12","amount":12000},{"date":"2027-03-13","amount":12000}],"room_lines":[{"index":1,"room_type_id":"ab94a25e-5cef-5d1b-92c3-f0f9ddd9c53f","rate_plan_id":"5b04a6c7-8418-5453-b9f5-dddde5a4d190"}]},"schema":{"$ref":"#/components/schemas/Reservation"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"}}}},"/v1/reservations/{id}/check-out":{"parameters":[{"$ref":"#/components/parameters/Id"}],"post":{"tags":["Reservations"],"operationId":"checkOutReservation","summary":"Record that the guest left","description":"Requires `write:reservations`. Needs a check-in first (`409 stay_out_of_order`). Only the record changes (`checked_out_at`). Doing it twice keeps the first time.\n","responses":{"200":{"description":"The reservation, with the stay as it is now.","content":{"application/json":{"example":{"id":"70c07ff5-0c9e-53af-ae3b-09ca64488642","property_id":"66427eb8-549a-5488-90ca-7d10ee92bc4e","connection_id":null,"source":"manual","booked_via":"staff","notes":"Late arrival, after 10 pm. Extra bed requested.","payment_status":"deposit","external_id":"KN-EFANW6","status":"confirmed","pending_reason":null,"room_type_id":"ab94a25e-5cef-5d1b-92c3-f0f9ddd9c53f","rate_plan_id":"5b04a6c7-8418-5453-b9f5-dddde5a4d190","arrival":"2027-03-11","departure":"2027-03-14","stay_nights":3,"rooms":1,"adults":2,"children":0,"currency":"USD","total_amount":36000,"nights_derived":false,"collected_by":"hotel","collected_by_assumed":false,"booked_at":"2027-03-01T09:04:00Z","cancelled_at":null,"checked_in_at":"2027-03-01T09:09:00Z","checked_out_at":"2027-03-01T09:11:00Z","no_show_at":null,"first_received_at":"2027-03-01T09:04:00Z","updated_at":"2027-03-01T09:12:00Z","placement":null,"guest":{"name":"Ana Lee","email":"ana.lee@example.com","phone":"+1 555 0100","country":"US"},"nights":[{"date":"2027-03-11","amount":12000},{"date":"2027-03-12","amount":12000},{"date":"2027-03-13","amount":12000}],"room_lines":[{"index":1,"room_type_id":"ab94a25e-5cef-5d1b-92c3-f0f9ddd9c53f","rate_plan_id":"5b04a6c7-8418-5453-b9f5-dddde5a4d190"}]},"schema":{"$ref":"#/components/schemas/Reservation"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"}}}},"/v1/reservations/{id}/no-show":{"parameters":[{"$ref":"#/components/parameters/Id"}],"post":{"tags":["Reservations"],"operationId":"markReservationNoShow","summary":"Record that the guest did not come","description":"Requires `write:reservations`. Only for a guest who has not checked in (`409 stay_out_of_order`). Only the record changes (`no_show_at`): the rooms are not given back.\n","responses":{"200":{"description":"The reservation, with the stay as it is now.","content":{"application/json":{"example":{"id":"70c07ff5-0c9e-53af-ae3b-09ca64488642","property_id":"66427eb8-549a-5488-90ca-7d10ee92bc4e","connection_id":null,"source":"manual","booked_via":"staff","notes":"Late arrival, after 10 pm. Extra bed requested.","payment_status":"deposit","external_id":"KN-EFANW6","status":"confirmed","pending_reason":null,"room_type_id":"ab94a25e-5cef-5d1b-92c3-f0f9ddd9c53f","rate_plan_id":"5b04a6c7-8418-5453-b9f5-dddde5a4d190","arrival":"2027-03-11","departure":"2027-03-14","stay_nights":3,"rooms":1,"adults":2,"children":0,"currency":"USD","total_amount":36000,"nights_derived":false,"collected_by":"hotel","collected_by_assumed":false,"booked_at":"2027-03-01T09:04:00Z","cancelled_at":null,"checked_in_at":null,"checked_out_at":null,"no_show_at":"2027-03-01T09:07:00Z","first_received_at":"2027-03-01T09:04:00Z","updated_at":"2027-03-01T09:08:00Z","placement":null,"guest":{"name":"Ana Lee","email":"ana.lee@example.com","phone":"+1 555 0100","country":"US"},"nights":[{"date":"2027-03-11","amount":12000},{"date":"2027-03-12","amount":12000},{"date":"2027-03-13","amount":12000}],"room_lines":[{"index":1,"room_type_id":"ab94a25e-5cef-5d1b-92c3-f0f9ddd9c53f","rate_plan_id":"5b04a6c7-8418-5453-b9f5-dddde5a4d190"}]},"schema":{"$ref":"#/components/schemas/Reservation"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"}}}},"/v1/reservations/{id}/undo-stay":{"parameters":[{"$ref":"#/components/parameters/Id"}],"post":{"tags":["Reservations"],"operationId":"undoReservationStay","summary":"Take back the last step of the stay","description":"Requires `write:reservations`. Takes back the last step: leaving first, then arriving, then no-show. Use it when a button was pressed by mistake.\n","responses":{"200":{"description":"The reservation, with the stay as it is now.","content":{"application/json":{"example":{"id":"70c07ff5-0c9e-53af-ae3b-09ca64488642","property_id":"66427eb8-549a-5488-90ca-7d10ee92bc4e","connection_id":null,"source":"manual","booked_via":"staff","notes":"Late arrival, after 10 pm. Extra bed requested.","payment_status":"deposit","external_id":"KN-EFANW6","status":"confirmed","pending_reason":null,"room_type_id":"ab94a25e-5cef-5d1b-92c3-f0f9ddd9c53f","rate_plan_id":"5b04a6c7-8418-5453-b9f5-dddde5a4d190","arrival":"2027-03-11","departure":"2027-03-14","stay_nights":3,"rooms":1,"adults":2,"children":0,"currency":"USD","total_amount":36000,"nights_derived":false,"collected_by":"hotel","collected_by_assumed":false,"booked_at":"2027-03-01T09:04:00Z","cancelled_at":null,"checked_in_at":"2027-03-01T09:09:00Z","checked_out_at":null,"no_show_at":null,"first_received_at":"2027-03-01T09:04:00Z","updated_at":"2027-03-01T09:13:00Z","placement":null,"guest":{"name":"Ana Lee","email":"ana.lee@example.com","phone":"+1 555 0100","country":"US"},"nights":[{"date":"2027-03-11","amount":12000},{"date":"2027-03-12","amount":12000},{"date":"2027-03-13","amount":12000}],"room_lines":[{"index":1,"room_type_id":"ab94a25e-5cef-5d1b-92c3-f0f9ddd9c53f","rate_plan_id":"5b04a6c7-8418-5453-b9f5-dddde5a4d190"}]},"schema":{"$ref":"#/components/schemas/Reservation"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"}}}},"/v1/reservations/{id}/send-confirmation":{"parameters":[{"$ref":"#/components/parameters/Id"}],"post":{"tags":["Reservations"],"operationId":"sendReservationConfirmation","summary":"Email the guest of a reservation the hotel made itself","description":"Requires `write:reservations`. Sends what was booked (or that it was cancelled) to the guest address stored on the reservation, and\nonly there; the address is never returned. Nothing is sent by itself: this is the one way an email goes to a guest.\n`locale` (`en` or `id`) picks the language; without it the `Accept-Language` header does. Refused when the server cannot send\nemail (`503 email_not_configured`), when the reservation has no guest address (`409 no_guest_email`), or when a channel made it\n(`409 not_a_hotel_booking`).\n","requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"locale":{"type":"string","example":"en"}}}}}},"responses":{"200":{"description":"The email was handed to the mail server.","content":{"application/json":{"schema":{"type":"object","required":["sent"],"properties":{"sent":{"type":"boolean","const":true}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"503":{"description":"This server cannot send email, or the mail server did not take the message (`email_not_configured`, `email_not_sent`)."}}}},"/v1/properties/{id}/quote":{"parameters":[{"$ref":"#/components/parameters/Id"}],"post":{"tags":["Reservations"],"operationId":"quoteStay","summary":"Price a stay and say whether it can be booked","description":"Requires `read:ari`. Writes nothing. For each night the price for all the rooms and the rooms still free. `priced` is false and\n`total` null when a night has no price; `bookable` is false when a night has fewer free rooms than asked. `restrictions` lists the hotel's own rules the stay breaks; the hotel may still book it, the public booking page may not.\n","requestBody":{"required":true,"content":{"application/json":{"example":{"room_type_id":"ab94a25e-5cef-5d1b-92c3-f0f9ddd9c53f","arrival":"2027-03-11","departure":"2027-03-13","rooms":1},"schema":{"$ref":"#/components/schemas/QuoteRequest"}}}},"responses":{"200":{"description":"The quote.","content":{"application/json":{"example":{"currency":"USD","rate_plan_id":"5b04a6c7-8418-5453-b9f5-dddde5a4d190","nights":[{"date":"2027-03-11","amount":12000,"available":5},{"date":"2027-03-12","amount":12000,"available":5}],"total":24000,"bookable":true,"priced":true,"restrictions":[]},"schema":{"$ref":"#/components/schemas/Quote"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"}}}},"/v1/properties/{id}/guests":{"parameters":[{"$ref":"#/components/parameters/Id"}],"get":{"tags":["Reservations"],"operationId":"listGuests","summary":"List the guests of a property","description":"Requires `read:reservations.personal`: it is a list of people. A guest is told apart by **email address** (capitals do not matter) across every reservation of the property, whatever its source;\nthe name and country are those of the latest stay. `stays` counts the stays that were not cancelled and `cancelled` those that were. `next_arrival` is the first stay that has not begun.\nMost recent stay first, at most 500 (`truncated` says there are more). `no_address` counts reservations that hold a guest but no email address: they cannot be told apart, so they are not listed.\nA guest who was erased (`POST …/guest-data/erase`) is no longer listed. To see one guest's reservations, use `POST …/guest-data/export`.\n","responses":{"200":{"description":"The guests.","content":{"application/json":{"schema":{"type":"object","required":["data","truncated","no_address"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/GuestRow"}},"truncated":{"type":"boolean"},"no_address":{"type":"integer"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/properties/{id}/guest-data/export":{"parameters":[{"$ref":"#/components/parameters/Id"}],"post":{"tags":["Reservations"],"operationId":"exportGuestData","summary":"Show what is kept about a guest","description":"Requires `read:reservations.personal`. For a guest who asks what the hotel keeps about them: every reservation of this property that holds the email address (capitals do not matter),\nwith the data kept. The address goes in the body, never in the URL, because addresses end up in logs.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["email"],"properties":{"email":{"type":"string"}}}}}},"responses":{"200":{"description":"The reservations that hold the guest.","content":{"application/json":{"schema":{"type":"object","required":["email","reservations"],"properties":{"email":{"type":"string"},"reservations":{"type":"array","items":{"$ref":"#/components/schemas/GuestStay"}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/properties/{id}/guest-data/erase":{"parameters":[{"$ref":"#/components/parameters/Id"}],"post":{"tags":["Reservations"],"operationId":"eraseGuestData","summary":"Erase a guest","description":"Requires `write:reservations`. Removes the guest's name, email, phone and country from every reservation of this property that holds the email address and whose stay is over (or that was\ncancelled), and scrubs the stored channel messages of them. The booking itself stays, with its dates and amounts, so the hotel's figures do not change; only the person goes, even the hash\nthat would let the same guest be recognised. A stay that has not ended keeps its guest, because the hotel still needs to know who is coming; it is listed in `kept` (without the guest) so it can be\nerased after the stay. The audit trail records that an erasure happened and how much, never whose. Erasing again is the same as erasing once.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["email"],"properties":{"email":{"type":"string"}}}}}},"responses":{"200":{"description":"What was erased and what was kept.","content":{"application/json":{"schema":{"type":"object","required":["erased","messages","kept"],"properties":{"erased":{"type":"integer","description":"Reservations cleared of the guest."},"messages":{"type":"integer","description":"Stored channel messages scrubbed."},"kept":{"type":"array","items":{"$ref":"#/components/schemas/GuestStay"}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/properties/{id}/housekeeping":{"parameters":[{"$ref":"#/components/parameters/Id"}],"get":{"tags":["Reservations"],"operationId":"getHousekeeping","summary":"The housekeeping board of a property","description":"Requires `read:reservations`. Every numbered room of the property with its housekeeping state (`dirty`, `clean`, `inspected` or `out_of_order`), the note, when the state was set, and what today\nholds for it (`occupied`: a guest has checked in and not out; `arriving`: somebody is to arrive today; `departing`: the guest leaves today). No guest is named. A room nobody has said anything\nabout is `clean`. `today` is the property's own date. `counts` is how many rooms are in each state.\n","responses":{"200":{"description":"The board.","content":{"application/json":{"schema":{"type":"object","required":["today","rooms","counts"],"properties":{"today":{"type":"string","format":"date"},"rooms":{"type":"array","items":{"$ref":"#/components/schemas/HousekeepingRoom"}},"counts":{"type":"object","additionalProperties":{"type":"integer"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/room-numbers/{id}/housekeeping":{"parameters":[{"$ref":"#/components/parameters/Id"}],"put":{"tags":["Reservations"],"operationId":"putRoomHousekeeping","summary":"Set the housekeeping state of a numbered room","description":"Requires `write:reservations`. `at` is when the person made the change on their own device (default: now; a time more than five minutes ahead is taken as now). A housekeeper with a weak signal\nsends the change later: if a newer change is already there, this older one is not applied and the answer says `applied: false` with the state as it is. `note` is kept when left out, replaced when sent\nand cleared when empty (at most 200 characters). A room becomes `dirty` by itself when its guest checks out, unless it is `out_of_order`.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["status"],"properties":{"status":{"type":"string","enum":["dirty","clean","inspected","out_of_order"]},"note":{"type":"string","maxLength":200},"at":{"type":"string","format":"date-time"}}}}}},"responses":{"200":{"description":"The room after the change.","content":{"application/json":{"schema":{"type":"object","required":["id","status","note","status_at","applied"],"properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["dirty","clean","inspected","out_of_order"]},"note":{"type":"string"},"status_at":{"type":"string","format":"date-time"},"applied":{"type":"boolean","description":"False when a newer change was already there."}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/properties/{id}/guest-identity/lookup":{"parameters":[{"$ref":"#/components/parameters/Id"}],"post":{"tags":["Reservations"],"operationId":"lookupGuestIdentity","summary":"Look up the identity kept for a guest","description":"Requires `read:reservations.personal`. The identity of a guest (the kind and number of the identity document, the nationality, the date of birth and whether a photograph of the document\nis kept) is used for the registration card. A guest is told apart by email address, capitals do not matter. The address is sent in the body, never in an address. `identity` is `null`\nwhen nothing is kept.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["email"],"properties":{"email":{"type":"string"}}}}}},"responses":{"200":{"description":"The identity, or `null`.","content":{"application/json":{"schema":{"type":"object","required":["identity"],"properties":{"identity":{"oneOf":[{"$ref":"#/components/schemas/GuestIdentity"},{"type":"null"}]}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/properties/{id}/guest-identity":{"parameters":[{"$ref":"#/components/parameters/Id"}],"put":{"tags":["Reservations"],"operationId":"putGuestIdentity","summary":"Keep the identity of a guest","description":"Requires `write:reservations`. Sets what is kept about the guest with this email address; every field is replaced, and an empty one clears it. The photograph is not touched (see\n`putGuestIdentityPhoto`). The audit trail records that it was changed, never whose or what number. The identity is removed when the guest is erased (unless a stay is still to come) and, by\ndefault, 90 days after the guest's last stay (`CHANNEL_MANAGER_GUEST_ID_RETENTION_DAYS`).\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["email"],"properties":{"email":{"type":"string"},"doc_type":{"type":["string","null"],"enum":["passport","id_card","driving_licence","other",null]},"doc_number":{"type":["string","null"],"maxLength":40},"nationality":{"type":["string","null"],"description":"Two-letter country code.","examples":["ID"]},"birth_date":{"type":["string","null"],"format":"date"}}}}}},"responses":{"200":{"description":"The identity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuestIdentity"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/guest-identities/{id}":{"parameters":[{"$ref":"#/components/parameters/Id"}],"delete":{"tags":["Reservations"],"operationId":"deleteGuestIdentity","summary":"Delete the identity of a guest, with its photograph","description":"Requires `write:reservations`. Removes everything kept for the guest's identity: the document kind and number, the nationality, the date of birth and the photograph.","responses":{"200":{"description":"Deleted.","content":{"application/json":{"schema":{"type":"object","required":["deleted"],"properties":{"deleted":{"type":"boolean"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/guest-identities/{id}/photo":{"parameters":[{"$ref":"#/components/parameters/Id"}],"put":{"tags":["Reservations"],"operationId":"putGuestIdentityPhoto","summary":"Keep a photograph of the guest's identity document","description":"Requires `write:reservations`. The body is the picture itself (JPEG, PNG or WebP, at most 1.5 MB), told by its first bytes. It is encrypted with the hotel's own data key before it is stored.\n","requestBody":{"required":true,"content":{"image/jpeg":{"schema":{"type":"string","format":"binary"}}}},"responses":{"200":{"description":"The identity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuestIdentity"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"},"413":{"description":"The picture is over 1.5 MB."}}},"get":{"tags":["Reservations"],"operationId":"getGuestIdentityPhoto","summary":"The photograph of the identity document","description":"Requires `read:reservations.personal`. Looking at it is written in the audit trail (who and when, never whose). `404` when there is none. Sent with `Cache-Control private, no-store`.","responses":{"200":{"description":"The picture.","content":{"image/jpeg":{"schema":{"type":"string","format":"binary"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}},"delete":{"tags":["Reservations"],"operationId":"deleteGuestIdentityPhoto","summary":"Remove the photograph and keep the rest","description":"Requires `write:reservations`. Removes the photograph of the identity document and keeps the kind, the number, the nationality and the date of birth.","responses":{"200":{"description":"The identity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuestIdentity"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/properties/{id}/pms-reservations":{"parameters":[{"$ref":"#/components/parameters/Id"}],"put":{"tags":["Reservations"],"operationId":"reportPmsReservations","summary":"Report the reservations of the hotel's own software, to be shown","description":"Requires `write:reservations`. For a property run by its own software (`pms_authoritative`): the software reports who stays, comes and goes, so\nthe panel can show them. They are for DISPLAY ONLY (`source: pms`): the software already counts their rooms in the availability it pushes, so Antero Connect\ntakes no rooms off sale for them. The same `reference` (the software's own number for the reservation) again updates the same reservation;\nreporting the same thing twice changes nothing. A reservation made in Antero Connect, or by a channel, is never overwritten (`409 not_a_reported_reservation`),\nand a property Antero Connect runs answers `409 channel_manager_owns_rooms`. Reservations that came from a channel are not to be reported: Antero Connect already has them.\nUp to 200 per call; one that is invalid refuses the whole call and says which (`items[3]`).\n","requestBody":{"required":true,"content":{"application/json":{"example":{"items":[{"reference":"FD-1042","status":"confirmed","room_type_id":"ab94a25e-5cef-5d1b-92c3-f0f9ddd9c53f","arrival":"2027-03-14","departure":"2027-03-16","rooms":1,"adults":2,"total_amount":24000,"currency":"USD","guest":{"name":"Budi Santoso","email":"budi@example.com"}}]},"schema":{"$ref":"#/components/schemas/PmsReservationsPut"}}}},"responses":{"200":{"description":"How many were recorded.","content":{"application/json":{"example":{"reported":1},"schema":{"type":"object","required":["reported"],"properties":{"reported":{"type":"integer"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"}}}},"/v1/properties/{id}/availability/explain":{"parameters":[{"$ref":"#/components/parameters/Id"}],"get":{"tags":["Availability and rates"],"operationId":"explainAvailability","summary":"Why a room type has the availability it has on a day","description":"Requires `read:ari`. Shows the number the PMS set, the holds that take rooms off it (reservations received from\na channel that the PMS has not taken into account yet), and the **effective** number Antero Connect sends to the\nchannels: the PMS's number minus the holds, never below 0. A hold never expires by itself; it is released\nonly when the PMS says it has accounted for the reservation.\n","parameters":[{"name":"room_type_id","in":"query","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"date","in":"query","required":true,"schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"The explanation.","content":{"application/json":{"example":{"room_type_id":"ab94a25e-5cef-5d1b-92c3-f0f9ddd9c53f","date":"2027-03-11","available":5,"source":"api","holds":[{"reservation_id":"70c07ff5-0c9e-53af-ae3b-09ca64488642","external_id":"KN-EFANW6","connection_id":null,"qty":1,"feed_seq":1}],"held":1,"effective":4},"schema":{"$ref":"#/components/schemas/AvailabilityExplanation"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/properties/{id}/reservation-feed":{"parameters":[{"$ref":"#/components/parameters/Id"}],"get":{"tags":["Reservations"],"operationId":"getReservationFeed","summary":"The numbered feed of reservations the PMS pulls","description":"Requires `read:reservations`. Every entry says that something happened to a reservation which the PMS must take\ninto account: `created` (first time it is `confirmed`), `modified`, `cancelled` (only for a reservation the PMS\nalready had), `placement` (the PMS moved the guest itself). A reservation that is still `pending` is not in the feed\nyet. Entries come oldest first, only those with a number above `after`; the numbers belong to the property and\nalways grow, but may skip (a skipped number belongs to a hold of a reservation that was not in the feed yet).\nA PMS that was down resumes from the last number it handled; nothing is lost because a webhook failed. When it\nhas recorded the entries, it pushes availability with `feed_applied_through` (see `PUT …/availability`). The\nguest's contact data is only in `guest` for a key with `read:reservations.personal`, and only until it is\ncleared after the retention period.\n","parameters":[{"name":"after","in":"query","schema":{"type":"integer","minimum":0,"default":0},"description":"Return entries with a number above this."},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":100}}],"responses":{"200":{"description":"The entries, the property's newest number and how far the PMS has confirmed.","content":{"application/json":{"example":{"data":[{"seq":1,"kind":"created","reservation_id":"70c07ff5-0c9e-53af-ae3b-09ca64488642","external_id":"KN-EFANW6","created_at":"2027-03-01T09:05:00Z","reservation":{"id":"70c07ff5-0c9e-53af-ae3b-09ca64488642","notes":"Late arrival, after 10 pm","rooms":1,"adults":2,"nights":[{"date":"2027-03-11","amount":12000},{"date":"2027-03-12","amount":12000}],"source":"manual","status":"confirmed","arrival":"2027-03-11","children":0,"currency":"USD","booked_at":"2027-03-01T09:04:00Z","departure":"2027-03-13","placement":null,"booked_via":"staff","no_show_at":null,"room_lines":[{"index":1,"rate_plan_id":"5b04a6c7-8418-5453-b9f5-dddde5a4d190","room_type_id":"ab94a25e-5cef-5d1b-92c3-f0f9ddd9c53f"}],"updated_at":"2027-03-01T09:05:00Z","external_id":"KN-EFANW6","property_id":"66427eb8-549a-5488-90ca-7d10ee92bc4e","stay_nights":2,"cancelled_at":null,"collected_by":"hotel","rate_plan_id":"5b04a6c7-8418-5453-b9f5-dddde5a4d190","room_type_id":"ab94a25e-5cef-5d1b-92c3-f0f9ddd9c53f","total_amount":24000,"checked_in_at":null,"connection_id":null,"checked_out_at":null,"nights_derived":false,"payment_status":"deposit","pending_reason":null,"first_received_at":"2027-03-01T09:04:00Z","collected_by_assumed":false},"guest":{"name":"Ana Lee","email":"ana.lee@example.com","phone":"+1 555 0100","country":"US"}}],"head":1,"applied_through":0},"schema":{"type":"object","required":["data","head","applied_through"],"properties":{"data":{"type":"array","items":{"type":"object","required":["seq","kind","reservation_id","external_id","created_at","reservation"],"properties":{"seq":{"type":"integer"},"kind":{"type":"string","enum":["created","modified","cancelled","placement"]},"reservation_id":{"type":"string","format":"uuid"},"external_id":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"reservation":{"type":"object","description":"The reservation as it was at that moment, without the guest and without the mirror."},"guest":{"type":"object","description":"Only with read:reservations.personal and while Antero Connect still holds it."}}}},"head":{"type":"integer","description":"The newest number of this property's feed."},"applied_through":{"type":"integer","description":"How far the PMS has confirmed."}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/properties/{id}/decisions":{"parameters":[{"$ref":"#/components/parameters/Id"}],"get":{"tags":["Decisions"],"operationId":"listDecisions","summary":"The decision board of a property","description":"Requires `read:decisions`. What Antero Connect deliberately does not guess becomes an item here: a cancellation for a booking it\ndoes not know (`missed_cancellation`, with `detail.candidates`, the live reservations whose number begins alike), a booking\nwithout a price (`no_price`), a room or rate that is not mapped (`unmapped`), invalid dates, nights or currency\n(`bad_data`), a change that came after a cancellation (`revision_after_cancel`) and a message that could not be read\n(`unreadable_message`). Items settle themselves when their cause goes away (the mapping is added, the booking arrives, a\nprice comes). `status` defaults to `open`; pass an empty `status` for all.\n","parameters":[{"name":"status","in":"query","schema":{"type":"string","enum":["open","resolved","dismissed"]}},{"name":"kind","in":"query","schema":{"type":"string","enum":["missed_cancellation","no_price","unmapped","bad_data","revision_after_cancel","unreadable_message"]}},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/After"}],"responses":{"200":{"description":"A page of decisions, newest first.","content":{"application/json":{"example":{"data":[],"next_cursor":null},"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Decision"}},"next_cursor":{"type":["string","null"]}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/decisions/{id}":{"parameters":[{"$ref":"#/components/parameters/Id"}],"get":{"tags":["Decisions"],"operationId":"getDecision","summary":"One decision","description":"Requires `read:decisions`. One decision: what happened, which booking or channel it is about, the actions that settle it and their meaning. A decision closes by itself when its cause is gone.\n","responses":{"200":{"description":"The decision.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Decision"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/decisions/{id}/resolve":{"parameters":[{"$ref":"#/components/parameters/Id"}],"post":{"tags":["Decisions"],"operationId":"resolveDecision","summary":"Settle a decision","description":"Requires `write:decisions`. `action` depends on the kind (`actions` of the decision lists them):\n`cancel_reservation` (missed_cancellation; `reservation_id` must be one of `detail.candidates` and still live),\n`set_total` (no_price; `total` in the currency's smallest unit, 0 or more; the booking is completed from it),\n`reopen` (revision_after_cancel; the change is applied and the reservation lives again, with its holds and a\n`modified` feed entry) and `dismiss` (any kind; the message is ignored; a booking that waits for a mapping then\nstays pending and is no longer completed by a new mapping). Cancelling by decision never raises availability: the\nholds stay until the PMS confirms through the feed. 409 `decision_not_open`; 400 `action_not_allowed`.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["action"],"properties":{"action":{"type":"string","enum":["cancel_reservation","set_total","reopen","dismiss"]},"reservation_id":{"type":"string","format":"uuid"},"total":{"type":"integer","minimum":0},"note":{"type":"string","maxLength":200}}}}}},"responses":{"200":{"description":"The decision, settled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Decision"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"}}}},"/v1/properties/{id}/webhook-endpoints":{"parameters":[{"$ref":"#/components/parameters/Id"}],"post":{"tags":["Webhooks"],"operationId":"createWebhookEndpoint","summary":"Register a receiver for the nudges about the reservation feed","description":"Requires `write:webhooks`. Whenever the property's reservation feed grows, Antero Connect POSTs a small signed message\nto `url` so that the PMS pulls the feed sooner; **the feed is the truth, the webhook only a nudge**, so it may fail,\nrepeat or arrive late, and it carries no guest and no price. The body is\n`{id, type: \"reservation.feed\", property_id, seq, kind, reservation_id, external_id, created_at}`. Headers:\n`X-Channel-Manager-Signature: t=<unix>,v1=<hex HMAC-SHA256(secret, \"<t>.<body>\")>`, `X-Channel-Manager-Event`, `X-Channel-Manager-Delivery` (the\nsame on every attempt: drop duplicates by it). Verify the signature with the secret and reject a `t` more than five\nminutes away. A 2xx answer is success; anything else (or no answer within 10 s, or a redirect) is retried after\n1, 2, 4, 8, 16, 32 and 60 minutes, and after the 8th failed attempt the message is `dead` and waits to be replayed.\nThe **secret is shown once**, in this response; no `Idempotency-Key` is accepted. In production `url` must be `https`\nand must not name a private or local place.\n","requestBody":{"required":true,"content":{"application/json":{"example":{"url":"https://pms.example.com/hooks/channel-manager"},"schema":{"type":"object","additionalProperties":false,"required":["url"],"properties":{"url":{"type":"string","maxLength":500}}}}}},"responses":{"201":{"description":"The endpoint, with its secret (only now).","content":{"application/json":{"example":{"id":"947e5853-fa92-5152-baa9-940d076b6b71","property_id":"66427eb8-549a-5488-90ca-7d10ee92bc4e","url":"https://pms.example.com/hooks/channel-manager","status":"active","secret_fingerprint":"bd3406ef524a9ebe","created_at":"2027-03-01T09:16:00Z","updated_at":"2027-03-01T09:16:00Z","secret":"whsec_00000000example"},"schema":{"$ref":"#/components/schemas/WebhookEndpointWithSecret"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}},"get":{"tags":["Webhooks"],"operationId":"listWebhookEndpoints","summary":"Receivers of a property","description":"Requires `read:webhooks`. Never shows a secret.","responses":{"200":{"description":"The endpoints.","content":{"application/json":{"example":{"data":[{"id":"947e5853-fa92-5152-baa9-940d076b6b71","property_id":"66427eb8-549a-5488-90ca-7d10ee92bc4e","url":"https://pms.example.com/hooks/channel-manager","status":"active","secret_fingerprint":"bd3406ef524a9ebe","created_at":"2027-03-01T09:16:00Z","updated_at":"2027-03-01T09:16:00Z"}]},"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEndpoint"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/webhook-endpoints/{id}":{"parameters":[{"$ref":"#/components/parameters/Id"}],"get":{"tags":["Webhooks"],"operationId":"getWebhookEndpoint","summary":"One receiver","description":"Requires `read:webhooks`. One receiver: its address, whether it is active or paused, and a fingerprint of its signing secret. The secret itself is shown once, when the receiver is created or its secret rotated.\n","responses":{"200":{"description":"The endpoint.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}},"patch":{"tags":["Webhooks"],"operationId":"updateWebhookEndpoint","summary":"Change the address or pause or resume","description":"Requires `write:webhooks`. A paused endpoint receives nothing; what waited is sent when it is active again.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"url":{"type":"string","maxLength":500},"status":{"type":"string","enum":["active","paused"]}}}}}},"responses":{"200":{"description":"The endpoint.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}},"delete":{"tags":["Webhooks"],"operationId":"deleteWebhookEndpoint","summary":"Remove a receiver","description":"Requires `write:webhooks`. What was still pending for it is marked `dead` with the reason, not lost silently.","responses":{"204":{"description":"Removed."},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/webhook-endpoints/{id}/rotate-secret":{"parameters":[{"$ref":"#/components/parameters/Id"}],"post":{"tags":["Webhooks"],"operationId":"rotateWebhookSecret","summary":"Replace the signing secret","description":"Requires `write:webhooks`. The old secret stops working at once. The new one is shown once, here.","responses":{"200":{"description":"The endpoint, with its new secret.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointWithSecret"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/webhook-endpoints/{id}/deliveries":{"parameters":[{"$ref":"#/components/parameters/Id"}],"get":{"tags":["Webhooks"],"operationId":"listWebhookDeliveries","summary":"Messages sent (or waiting) to a receiver","description":"Requires `read:webhooks`. Newest first. `dead` messages ran out of attempts and wait for `POST /v1/webhook-deliveries/{id}/replay`.","parameters":[{"name":"status","in":"query","schema":{"type":"string","enum":["pending","delivered","dead"]}},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/After"}],"responses":{"200":{"description":"A page of deliveries.","content":{"application/json":{"example":{"data":[],"next_cursor":null},"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDelivery"}},"next_cursor":{"type":["string","null"]}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/webhook-deliveries/{id}/replay":{"parameters":[{"$ref":"#/components/parameters/Id"}],"post":{"tags":["Webhooks"],"operationId":"replayWebhookDelivery","summary":"Send a dead or delivered message again","description":"Requires `write:webhooks`. Queues a fresh attempt with the same delivery id. 409 `delivery_not_replayable` for one that is still pending or whose endpoint is gone.","responses":{"202":{"description":"Queued.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDelivery"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"}}}},"/v1/properties/{id}/status":{"parameters":[{"$ref":"#/components/parameters/Id"}],"get":{"tags":["Monitoring"],"operationId":"getPropertyStatus","summary":"The property's verdict, computed now","description":"Requires `read:sync`. **One verdict** from the facts that really hold sales back, computed live (never a stored copy that\ncould be green while a gate is shut): feed entries the PMS has not confirmed (and the holds they keep), messages from\nchannels waiting to be processed (which hold back increases), connections that are degraded, down or refused, webhooks that\ngave up, decisions nobody took. `ok` means no finding; `degraded` a warning; `critical` something that needs a person now.\nIf the monitor itself has gone quiet that is a finding too (`heartbeat_stale`). The periodic job and the alerts use the same\nfunction. **No alert ever releases a hold**: holds never expire by time.\n","responses":{"200":{"description":"The verdict.","content":{"application/json":{"example":{"verdict":"critical","evaluated_at":"2027-03-01T09:20:00Z","last_beat_at":null,"findings":[{"kind":"heartbeat_stale","subject":"","severity":"critical","summary":"The monitor of this property has not run for a long time; do not trust a quiet panel.","detail":{}}]},"schema":{"$ref":"#/components/schemas/PropertyStatus"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/properties/{id}/alerts":{"parameters":[{"$ref":"#/components/parameters/Id"}],"get":{"tags":["Monitoring"],"operationId":"listPropertyAlerts","summary":"Alerts of a property","description":"Requires `read:sync`. Alerts open when a finding appears, change severity with it and resolve themselves when it is gone. Newest first.","parameters":[{"name":"status","in":"query","schema":{"type":"string","enum":["open","resolved"]}},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/After"}],"responses":{"200":{"description":"A page of alerts.","content":{"application/json":{"schema":{"type":"object","required":["data","next_cursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Alert"}},"next_cursor":{"type":["string","null"]}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/properties/{id}/monitor/start":{"parameters":[{"$ref":"#/components/parameters/Id"}],"post":{"tags":["Monitoring"],"operationId":"startPropertyMonitor","summary":"Make sure the property is monitored","description":"Requires `write:catalog`. New properties are monitored from the start; this is for older ones. Safe to repeat (one chain per property).","responses":{"202":{"description":"Whether a chain was started now.","content":{"application/json":{"schema":{"type":"object","required":["started"],"properties":{"started":{"type":"boolean"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/auth/magic-link":{"post":{"tags":["Signing in"],"operationId":"requestMagicLink","summary":"Email a sign-in link (also how a new person signs up)","description":"The main way to sign in. Answers **202 with the same words whether or not the address has an account** (an unknown address\ngets an account when the link is used). The link works for 15 minutes and once, and opens the panel's sign-in page with the\ntoken in the fragment; the page then calls `POST /v1/auth/verify`. Emails are in English or Indonesian (`locale`,\nor `Accept-Language`). Limited per address and per caller (429 `too_many_attempts`, `Retry-After`); a limit reached for one\nemail address is not revealed (still 202, no email). 503 `email_not_configured` when the server cannot send email.\n","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["email"],"properties":{"email":{"type":"string","format":"email"},"locale":{"type":"string","description":"en, id, ms, zh, vi, th or fil (a regional form such as id-ID is understood)."}}}}}},"responses":{"202":{"description":"A link is on its way, if the address is right.","content":{"application/json":{"schema":{"type":"object","required":["status"],"properties":{"status":{"type":"string"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"429":{"description":"Too many attempts."},"503":{"description":"The server cannot send email."}}}},"/v1/contact":{"post":{"tags":["Signing in"],"operationId":"sendContactMessage","summary":"Write to us from the website (no address of ours is published)","description":"The contact form of the website, for a person who is not signed in. The message reaches our support mailbox with the sender's\naddress as the reply address. Limited per caller (429 `too_many_attempts`, `Retry-After`). A person who is signed in uses\nSupport (tickets) instead. 503 `contact_not_available` when we cannot take the message now.\n","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["name","email","message"],"properties":{"name":{"type":"string","maxLength":120},"email":{"type":"string","format":"email"},"message":{"type":"string","maxLength":4000},"website":{"type":"string","description":"A field people do not see; leave it empty."}}}}}},"responses":{"202":{"description":"The message is on its way to us."},"400":{"$ref":"#/components/responses/BadRequest"},"429":{"description":"Too many attempts."},"503":{"description":"We cannot take the message now."}}}},"/v1/auth/verify":{"post":{"tags":["Signing in"],"operationId":"verifyMagicLink","summary":"Turn a sign-in link's token into a session","description":"A POST on purpose: a program that merely opens the link (a mail scanner) must not use it up. A token that is wrong, expired\nor already used is one answer (401 `invalid_link`). The session token goes in `Authorization: Bearer` on every other call; it\nstays valid for 14 days without use and 90 days at most. A person with exactly one organization has it chosen already;\notherwise `organization_id` is null until `POST /v1/auth/organization` (or a new one is made with `POST /v1/auth/organizations`).\n","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["token"],"properties":{"token":{"type":"string"}}}}}},"responses":{"200":{"description":"The session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Session"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"description":"The link is not valid (invalid_link)."}}}},"/v1/auth/password/login":{"post":{"tags":["Signing in"],"operationId":"passwordLogin","summary":"Sign in with email and password (the second way)","description":"For a person who has set a password with `PUT /v1/auth/password`. An unknown address, an address without a password and a wrong\npassword are **one answer** (401 `invalid_credentials`) and cost the same time. Five failures per address in 15 minutes lock the\naddress for the rest of the window (429 `too_many_attempts`), whether or not the account exists.\n","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["email","password"],"properties":{"email":{"type":"string"},"password":{"type":"string"}}}}}},"responses":{"200":{"description":"The session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Session"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"description":"invalid_credentials."},"429":{"description":"Too many attempts."}}}},"/v1/auth/me":{"get":{"tags":["Signing in"],"operationId":"getMe","summary":"Who is signed in","description":"For a session (403 `session_required` for an API key). Lists the organizations the person belongs to, the one chosen, the role and the scopes.","responses":{"200":{"description":"The person.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"description":"session_required."}}},"delete":{"tags":["Signing in"],"operationId":"deleteMe","summary":"Delete my own login","description":"For a person signed in. Deletes the person's login: their memberships, sessions and e-mail address. Refused with `409 last_owner` while they are the only owner of an organization that still\nexists (close the account, or make someone else an owner, first). What they did stays in the history of the organization, without their address.\n","responses":{"200":{"description":"Deleted.","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"description":"session_required."},"409":{"description":"last_owner."}}}},"/v1/auth/terms":{"post":{"tags":["Signing in"],"operationId":"acceptTerms","summary":"Record that the person agreed to the terms","description":"For a person signed in. The sign-in page asks for a tick that means agreeing to the Terms of Service and the Privacy Policy; the panel sends it here once signed in. `version` must be the\nversion in force (`GET /v1/account` gives it as `terms_version`), or the answer is `400 invalid_request`. The version agreed to is shown as `user.terms_version` in `GET /v1/auth/me`.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["version"],"properties":{"version":{"type":"string","example":"2026-11-18"}}}}}},"responses":{"200":{"description":"Recorded.","content":{"application/json":{"schema":{"type":"object","properties":{"terms_version":{"type":"string"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"description":"session_required."}}}},"/v1/auth/logout":{"post":{"tags":["Signing in"],"operationId":"logout","summary":"End this session","description":"For a person signed in (a session). Ends this session at once; the session token stops working everywhere. Answers `204` whether or not the token was still valid, so it is safe to call twice.\n","responses":{"204":{"description":"Signed out."},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"description":"session_required."}}}},"/v1/auth/organization":{"post":{"tags":["Signing in"],"operationId":"selectOrganization","summary":"Work in one of the person's organizations","description":"Ties the session to an organization the person belongs to (404 for any other), with their role there. After this the scopes of the role apply to every other call.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["organization_id"],"properties":{"organization_id":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"The organization chosen.","content":{"application/json":{"schema":{"type":"object","required":["organization_id","role","scopes"],"properties":{"organization_id":{"type":"string","format":"uuid"},"role":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/auth/organizations":{"post":{"tags":["Signing in"],"operationId":"createOrganization","summary":"Create an organization (the person becomes its owner)","description":"The first thing a new person does. The new organization is chosen for the session. Roles give scopes: `owner` and `admin` all;\n`staff` all reads plus `write:ari`, `write:reservations`, `write:closures`, `write:decisions`; `readonly` all reads except guest data.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string","maxLength":120},"plan":{"type":"string","enum":["light","connect","max"],"description":"The plan chosen before signing up; left out","Antero Light.":null},"locale":{"type":"string","description":"The language the person signed up in. `id` starts the organization billed in rupiah (IDR) and written to in Indonesian; any other value starts it in US dollars and English."}}}}}},"responses":{"201":{"description":"The organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Membership"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/v1/auth/password":{"put":{"tags":["Signing in"],"operationId":"setPassword","summary":"Set or change the password (optional)","description":"For a session. At least 10 characters, not the email address. Stored with Argon2id. Not needed for signing in by link.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["password"],"properties":{"password":{"type":"string","minLength":10,"maxLength":200}}}}}},"responses":{"204":{"description":"Set."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/v1/reservations/{id}/placement":{"parameters":[{"$ref":"#/components/parameters/Id"}],"patch":{"tags":["Reservations"],"operationId":"placeReservation","summary":"Record where the PMS put a guest","description":"Requires `write:reservations`. The PMS decides where a guest really sleeps; what the channel booked is never\noverwritten, the PMS's choice is kept beside it (`placement`). Send what changes (`room_type_id`, `arrival`,\n`departure`, `rooms`); what is left out stays. Only a `confirmed` reservation can be placed (409\n`reservation_not_confirmed`). The new room type and dates are **held** at once (nothing is released: only\nthe PMS releases holds), and, when the reservation's channel keeps its own bookings (inventory model\n`ledger`, like Beds24), the channel is told, so that it stops counting the room the guest left. `mirror`\nshows how far that got (`pending`, `sent`, `blocked` for a room type that is not mapped on that connection,\nor `failed`). Sending the placement already in force changes nothing.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"room_type_id":{"type":"string","format":"uuid"},"arrival":{"type":"string","format":"date"},"departure":{"type":"string","format":"date","description":"The check-out day (exclusive)."},"rooms":{"type":"integer","minimum":1}}}}}},"responses":{"200":{"description":"The reservation, with its placement and mirror state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Reservation"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"}}}},"/v1/properties/{id}/closures":{"parameters":[{"$ref":"#/components/parameters/Id"}],"post":{"tags":["Closures"],"operationId":"createClosure","summary":"Close a room type for some days, at one OTA or at all of them","description":"Requires `write:closures`. A closure is the operator's intent; Antero Connect sends it, then **reads the channel back**\nand reports `status` honestly (`pending`, `sent`, `proven`, `disputed`, `blocked`, `expired`, `lifted`).\nWhat a channel can close is in its manifest (`GET /v1/channel-connections/{id}/capabilities`): a channel\nthat cannot close at all answers 409 `closure_not_supported`; a channel that can only close every OTA at once,\nor cannot close this OTA on its own, answers 409 `closure_not_supported_for_ota`; both name `alternatives`.\nLeave `sub_channel` out to close every OTA the channel can reach; `unreachable_sub_channels` lists the OTAs\nthat stay open. `date_from` and `date_to` are inclusive.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["connection_id","room_type_id","date_from","date_to"],"properties":{"connection_id":{"type":"string","format":"uuid","description":"The channel connection to close the room type at."},"room_type_id":{"type":"string","format":"uuid"},"sub_channel":{"type":"string","description":"An OTA behind the connection, e.g. agoda. Empty = every OTA."},"date_from":{"type":"string","format":"date"},"date_to":{"type":"string","format":"date"},"reason":{"type":"string","maxLength":200}}}}}},"responses":{"201":{"description":"The closure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Closure"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"}}},"get":{"tags":["Closures"],"operationId":"listClosures","summary":"List closures of a property","description":"Requires `read:closures`. Active closures by default; newest first; at most 200.","parameters":[{"name":"connection_id","in":"query","schema":{"type":"string","format":"uuid"}},{"name":"include_lifted","in":"query","schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"Closures.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Closure"}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/closures/{id}":{"parameters":[{"$ref":"#/components/parameters/Id"}],"delete":{"tags":["Closures"],"operationId":"liftClosure","summary":"Lift a closure (open the days again)","description":"Requires `write:closures`. The closure stays listed with status `lifted`; lifting twice changes nothing.","responses":{"200":{"description":"The closure.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Closure"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/channel-connections/{id}/closure-diffs":{"parameters":[{"$ref":"#/components/parameters/Id"}],"get":{"tags":["Closures"],"operationId":"listClosureDiffs","summary":"What reading the channel back found different from what was closed","description":"Requires `read:closures`. `not_applied`: the channel answered OK and did not keep it. `changed_at_channel`:\na day that had been proven closed was found open (somebody changed it at the channel); it is closed again.\n","responses":{"200":{"description":"The newest differences, at most 200.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"type":"object","required":["id","sub_channel","room_type_id","day","expected_closed","cause","detected_at"],"properties":{"id":{"type":"string","format":"uuid"},"sub_channel":{"type":"string","description":"An OTA, or * for all of them at once."},"room_type_id":{"type":"string","format":"uuid"},"day":{"type":"string","format":"date"},"expected_closed":{"type":"boolean"},"cause":{"type":"string","enum":["not_applied","changed_at_channel"]},"detected_at":{"type":"string","format":"date-time"}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/channel-connections/{id}/pull":{"parameters":[{"$ref":"#/components/parameters/Id"}],"post":{"tags":["Channels"],"operationId":"requestPull","summary":"Pull reservations from the channel now","description":"Requires `write:channels`. Channels that offer a feed of reservations are pulled automatically every few minutes\n(`CHANNEL_MANAGER_PULL_MINUTES`) as a safety net beside webhooks; this asks for a pass now. What is received is stored and\nprocessed exactly like a webhook, and acknowledged to the channel afterwards. 409 `pull_not_supported` when the\nchannel has no feed.\n","responses":{"202":{"description":"A pass was queued.","content":{"application/json":{"schema":{"type":"object","required":["requested"],"properties":{"requested":{"type":"boolean"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"}}}},"/v1/channel-connections/{id}/audits":{"parameters":[{"$ref":"#/components/parameters/Id"}],"post":{"tags":["Channels"],"operationId":"createAudit","summary":"Check that Antero Connect has every booking the channel holds for some arrival days","description":"Requires `write:channels`. Asks the channel what it holds NOW for bookings arriving in the range (both days\ninclusive, at most 367 days) and compares it with Antero Connect. Each booking ends **matched**, **repaired** (the channel\nhas it and Antero Connect did not, or Antero Connect differs: it is stored and processed like a webhook) or **orphan** (Antero Connect has an\nactive reservation arriving in the range that the channel did not list: reported only, never cancelled by\nAntero Connect, and only when the whole list was read). 409 `audit_not_supported` when the channel cannot list its bookings.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["arrival_from","arrival_to"],"properties":{"arrival_from":{"type":"string","format":"date"},"arrival_to":{"type":"string","format":"date"}}}}}},"responses":{"202":{"description":"The audit was queued.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditRun"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"}}},"get":{"tags":["Channels"],"operationId":"listAudits","summary":"Audits of a connection, newest first","description":"Requires `read:channels`. The audit trail of a connection, newest first, at most 50: who connected it, changed a mapping, switched it on or off, and what the system decided by itself.\n","responses":{"200":{"description":"Audit runs.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AuditRun"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/v1/channel-connections/{id}/audits/{audit_id}":{"parameters":[{"$ref":"#/components/parameters/Id"},{"name":"audit_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"get":{"tags":["Channels"],"operationId":"getAudit","summary":"One audit with its findings","description":"Requires `read:channels`. `findings` lists what was repaired and what is an orphan (at most 1000).","responses":{"200":{"description":"The audit run.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditRun"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/ForbiddenScope"},"404":{"$ref":"#/components/responses/NotFound"}}}}},"webhooks":{"reservationFeed":{"post":{"tags":["Webhooks"],"operationId":"receiveReservationFeedWebhook","summary":"A reservation feed entry is waiting (Antero Connect calls your address)","description":"Not an operation of this API: this is what **Antero Connect sends to the address of a receiver** you registered with `POST /v1/properties/{id}/webhook-endpoints`.\nIt is a nudge: it says that the feed of a property has a new entry, number `seq`. **Read the feed** (`GET /v1/properties/{id}/reservation-feed`) to\nget the booking; the body carries no guest and no price, and a lost, late or doubled call cannot make you wrong, because the feed is the truth.\n\nCheck the signature before you act. `X-Channel-Manager-Signature` is `t=<unix seconds>,v1=<hex>`, where `v1` is the HMAC-SHA256, keyed with the receiver's\nsecret, of the text `<t>.<raw body>`. Compare in constant time, on the raw bytes, and refuse a `t` more than 5 minutes from your clock. Answer with any\n`2xx` within 10 seconds. Otherwise Antero Connect tries again after 1, 2, 4, 8, 16, 32 and 60 minutes, then gives up after the 8th try (the delivery is `dead`\nand can be replayed). See [Webhooks](/docs/webhooks.html) for samples in four languages.\n","parameters":[{"name":"X-Channel-Manager-Event","in":"header","required":true,"schema":{"type":"string","const":"reservation.feed"}},{"name":"X-Channel-Manager-Delivery","in":"header","required":true,"description":"The id of this delivery. The same delivery can arrive twice.","schema":{"type":"string","format":"uuid"}},{"name":"X-Channel-Manager-Signature","in":"header","required":true,"description":"`t=<unix seconds>,v1=<hex hmac-sha256>`.","schema":{"type":"string","example":"t=1798772400,v1=3b5c0e91f7d1a2b4c6e8f0a2b4c6e8f0a2b4c6e8f0a2b4c6e8f0a2b4c6e8f0a2"}}],"requestBody":{"required":true,"content":{"application/json":{"example":{"id":"4b4dd4ba-a86e-5f6e-841e-23ed76f25234","type":"reservation.feed","property_id":"c1960a18-5fb7-58c3-9776-2817eca6e2c8","seq":42,"kind":"created","reservation_id":"d09d3b6f-32fe-580a-ba44-329782bff72a","external_id":"KN-G6MSB7","created_at":"2027-03-01T09:05:00Z"},"schema":{"$ref":"#/components/schemas/FeedWebhookEvent"}}}},"responses":{"2XX":{"description":"Received. Any 2xx status within 10 seconds counts as delivered; do the work after you answered."}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API key","description":"An API key, made by a person signed in as owner or admin (Settings, Developers). It looks like `cm_<env>_<prefix>_<secret>`, for example\n`cm_prod_ab12cd34_0123456789abcdef0123456789abcdef`, and is shown **once**. Send it as `Authorization: Bearer <key>`. The scopes it carries\ndecide what it may do; each operation names its scope. See [Authentication](/docs/authentication.html).\n"}},"parameters":{"DryRun":{"name":"dry_run","in":"query","description":"`true` = say what this push WOULD do and save nothing: no days, no audit row, no queue job, the PMS version does not move.\nThe answer carries `dry_run: true`, `changed_days`, `affected_connections` (channels that would be told) and `held_days`\n(days that currently have held rooms). Errors are the same as for the real push.\n","schema":{"type":"boolean","default":false}},"Id":{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},"Limit":{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},"After":{"name":"after","in":"query","description":"The `next_cursor` of the previous page.","schema":{"type":"string"}},"IncludeArchived":{"name":"include_archived","in":"query","schema":{"type":"boolean","default":false}},"DateFrom":{"name":"date_from","in":"query","required":true,"description":"First day, as YYYY-MM-DD (the property's local calendar day), inclusive.","schema":{"type":"string","format":"date"}},"DateTo":{"name":"date_to","in":"query","required":true,"description":"Last day, inclusive. At most 540 days after date_from.","schema":{"type":"string","format":"date"}},"IdempotencyKey":{"name":"Idempotency-Key","in":"header","description":"A unique value (up to 200 characters) chosen by the caller for this operation.","schema":{"type":"string","minLength":1,"maxLength":200}}},"responses":{"BadRequest":{"description":"The request is malformed or a field is invalid. Codes `invalid_request`, `invalid_cursor`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"PaymentRequired":{"description":"The account is locked because it has no credit (the free trial ended, or the balance stayed below zero after the grace period). Code `payment_required`. Only billing and sign-in work until credit is added; the account opens again by itself when the balance is above zero. While locked, every channel is sent availability 0 so that nothing is sold with the last numbers; keep what you could not send and send it again once the account is open.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthorized":{"description":"The API key is missing or invalid. Code `unauthorized`.","headers":{"WWW-Authenticate":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"ForbiddenScope":{"description":"The key lacks the scope (`forbidden_scope`) or may not act on this property (`forbidden_property`).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"No such resource, or it belongs to another organization. Code `not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"TooManyRequests":{"description":"Too many tries from this address (or for this guest email). Code `too_many_attempts`; `Retry-After` says in seconds when to come back.","headers":{"Retry-After":{"schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Conflict":{"description":"A unique value is already taken (`duplicate_code`), the Idempotency-Key was used with a different\nrequest (`idempotency_key_reused`), the property is archived (`property_archived`), or an ARI push\nwas refused: `stale_version` (older than the newest accepted `pms_version`; nothing changed) or\n`version_conflict` (same version, different body).\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Fee":{"type":"object","additionalProperties":false,"required":["name","kind"],"description":"One line of taxes or fees on the booking page.","properties":{"name":{"type":"string","minLength":1,"maxLength":40,"example":"VAT"},"kind":{"type":"string","enum":["percent","per_stay","per_night","per_adult_night"],"description":"`percent` of the room price; `per_stay` once for the stay; `per_night` for each room and night; `per_adult_night` for each adult and night."},"basis_points":{"type":"integer","minimum":1,"maximum":10000,"description":"For `percent` only: hundredths of a percent (1000 is 10.00%)."},"amount":{"type":"integer","minimum":1,"description":"For the other kinds: in the smallest unit of the currency."},"included":{"type":"boolean","default":false,"description":"`true`: already inside the price, so only shown (a percentage is then the part of the price that is tax); `false`: added to the total."}}},"PriceLine":{"type":"object","required":["name","amount","included"],"properties":{"name":{"type":"string"},"amount":{"type":"integer","format":"int64","description":"What the line came to for this stay","in the smallest unit.":null},"included":{"type":"boolean","description":"`true`: part of the price already, shown only; `false`: added to the total."}}},"NotificationsInput":{"type":"object","additionalProperties":false,"required":["enabled","recipients"],"properties":{"enabled":{"type":"boolean"},"recipients":{"type":"array","maxItems":5,"items":{"type":"string"},"description":"Email addresses; at least one when `enabled`."},"on_new":{"type":"boolean","default":true,"description":"Email for each new booking."},"on_cancel":{"type":"boolean","default":true,"description":"Email for each cancellation."},"locale":{"type":"string","enum":["en","id","ms","zh","vi","th","fil"],"default":"en"}}},"Notifications":{"type":"object","required":["property_id","enabled","recipients","on_new","on_cancel","locale","since"],"properties":{"property_id":{"type":"string","format":"uuid"},"enabled":{"type":"boolean"},"recipients":{"type":"array","items":{"type":"string"}},"on_new":{"type":"boolean"},"on_cancel":{"type":"boolean"},"locale":{"type":"string","enum":["en","id","ms","zh","vi","th","fil"]},"since":{"type":"string","format":"date-time","description":"When it was switched on. Bookings that came before are not told."}}},"Routines":{"type":"object","required":["property_id","pre_enabled","pre_days","pre_message","post_enabled","post_days","post_message","locale","pre_since","post_since"],"properties":{"property_id":{"type":"string","format":"uuid"},"pre_enabled":{"type":"boolean"},"pre_days":{"type":"integer","minimum":1,"maximum":14},"pre_message":{"type":"string"},"post_enabled":{"type":"boolean"},"post_days":{"type":"integer","minimum":1,"maximum":14},"post_message":{"type":"string"},"locale":{"type":"string","enum":["en","id","ms","zh","vi","th","fil"]},"pre_since":{"type":"string","format":"date-time","description":"When the email before the stay was switched on. Stays whose moment came earlier are not written to."},"post_since":{"type":"string","format":"date-time","description":"The same for the email after the stay."}}},"Violation":{"type":"object","required":["code"],"properties":{"code":{"type":"string","enum":["stop_sell","closed_to_arrival","closed_to_departure","min_stay","max_stay"],"description":"Which rule."},"date":{"type":"string","format":"date","description":"The night or day the rule is about."},"value":{"type":"integer","description":"For `min_stay` and `max_stay`","the number of nights the rule asks for.":null}}},"FeedWebhookEvent":{"type":"object","description":"The body of a signed call to a receiver. Carries no guest and no price on purpose.","required":["id","type","property_id","seq","kind","reservation_id","external_id","created_at"],"properties":{"id":{"type":"string","format":"uuid","description":"The delivery id (also in `X-Channel-Manager-Delivery`)."},"type":{"type":"string","const":"reservation.feed"},"property_id":{"type":"string","format":"uuid"},"seq":{"type":"integer","description":"The number of the feed entry. Read the feed after your last number."},"kind":{"type":"string","enum":["created","modified","cancelled","placement"]},"reservation_id":{"type":"string"},"external_id":{"type":"string","description":"The booking number."},"created_at":{"type":"string","format":"date-time"}}},"BookingEngineInput":{"type":"object","required":["enabled","slug"],"additionalProperties":false,"properties":{"enabled":{"type":"boolean"},"slug":{"type":"string","example":"villa-sunrise"},"title":{"type":["string","null"],"maxLength":80,"description":"The name guests see. Empty = the property's name."},"accent":{"type":"string","example":"#007aff","description":"Colour of buttons and links, as #rrggbb."},"welcome":{"type":["string","null"],"maxLength":1000},"cancellation_policy":{"type":["string","null"],"maxLength":2000},"terms":{"type":["string","null"],"maxLength":4000},"max_nights":{"type":"integer","minimum":1,"maximum":90,"default":30},"max_rooms":{"type":"integer","minimum":1,"maximum":10,"default":4},"advance_days":{"type":"integer","minimum":1,"maximum":540,"default":365},"min_advance_days":{"type":"integer","minimum":0,"maximum":60,"default":0,"description":"How many days ahead a guest must book at least. 0 means a stay may start today; 1, tomorrow at the earliest."},"same_day_until":{"type":["string","null"],"example":"18:00","description":"For a stay that starts today: until what time of day (HH:MM, in the property's own time) it may be booked. Empty or null means all day."},"fees":{"type":"array","maxItems":5,"items":{"$ref":"#/components/schemas/Fee"},"description":"Taxes and fees shown to guests and added to the price on the page (or shown as included). Empty for none."},"guest_change_days":{"type":["integer","null"],"minimum":0,"maximum":60,"default":3,"description":"A guest may change or cancel their own booking until this many days before arrival (0 = until the day of arrival). `null`: never online, the hotel is asked. Left out: 3."},"payment_terms":{"type":"object","description":"What a guest must do about money when booking on the page. Left out: `optional`. `required` needs a way to pay (an active payment connection or a bank account), else `409 payment_method_missing`.","properties":{"mode":{"type":"string","enum":["at_property","optional","required"],"description":"`at_property`: pay at the hotel, nothing online is offered. `optional`: the hotel's gateway and bank accounts are offered, nothing is required. `required`: a deposit must be paid within `due_hours`, or the booking is released and the rooms go back on sale."},"deposit_percent":{"type":"integer","minimum":1,"maximum":100,"default":30,"description":"Of the total","rounded up; 100 is the whole price in advance. Used for `required`.":null},"due_hours":{"type":"integer","minimum":1,"maximum":168,"default":24,"description":"How long the guest has to pay the deposit. Used for `required`."}}},"questions":{"type":"array","maxItems":5,"items":{"$ref":"#/components/schemas/Question"},"description":"What the page asks every guest (up to five). Each gets the id `q1`, `q2`, ... in order; send the whole list each time."}}},"BookingEngine":{"type":"object","required":["property_id","enabled","slug","accent","max_nights","max_rooms","advance_days","min_advance_days","same_day_until","fees"],"properties":{"property_id":{"type":"string","format":"uuid"},"enabled":{"type":"boolean"},"slug":{"type":"string","example":"villa-sunrise"},"title":{"type":["string","null"],"maxLength":80},"accent":{"type":"string","example":"#007aff"},"welcome":{"type":["string","null"],"maxLength":1000},"cancellation_policy":{"type":["string","null"],"maxLength":2000},"terms":{"type":["string","null"],"maxLength":4000},"max_nights":{"type":"integer","minimum":1,"maximum":90},"max_rooms":{"type":"integer","minimum":1,"maximum":10},"advance_days":{"type":"integer","minimum":1,"maximum":540},"min_advance_days":{"type":"integer","minimum":0,"maximum":60},"same_day_until":{"type":["string","null"]},"fees":{"type":"array","items":{"$ref":"#/components/schemas/Fee"}},"questions":{"type":"array","items":{"$ref":"#/components/schemas/Question"}},"guest_change_days":{"type":["integer","null"]},"payment_terms":{"type":"object","properties":{"mode":{"type":"string","enum":["at_property","optional","required"]},"deposit_percent":{"type":"integer"},"due_hours":{"type":"integer"}}}}},"Question":{"type":"object","required":["label","kind"],"properties":{"id":{"type":"string","readOnly":true,"description":"`q1`, `q2`, ... given by the server in the order of the list."},"label":{"type":"string","minLength":1,"maxLength":80,"description":"What the guest reads."},"kind":{"type":"string","enum":["text","choice"],"description":"`text` is a line the guest types (at most 500 characters); `choice` is one of `options`."},"options":{"type":"array","minItems":2,"maxItems":8,"items":{"type":"string","maxLength":40},"description":"For `choice`: what a guest picks from."},"required":{"type":"boolean","default":false}}},"PmsLink":{"type":"object","required":["state","feed_head","applied_through","waiting_entries","held_bookings"],"properties":{"state":{"type":"string","enum":["never_connected","connected","waiting","silent"]},"last_heard_at":{"type":["string","null"],"format":"date-time"},"last_push_at":{"type":["string","null"],"format":"date-time"},"last_feed_read_at":{"type":["string","null"],"format":"date-time"},"pms_version":{"type":["integer","null"],"format":"int64","description":"The newest availability version Antero Connect accepted."},"feed_head":{"type":"integer","format":"int64"},"applied_through":{"type":"integer","format":"int64"},"applied_at":{"type":["string","null"],"format":"date-time"},"waiting_entries":{"type":"integer"},"oldest_waiting_seconds":{"type":["integer","null"],"format":"int64"},"held_bookings":{"type":"integer","description":"Bookings whose rooms Antero Connect keeps back until the PMS confirms them."}}},"Member":{"type":"object","required":["id","user_id","email","role","created_at","you"],"properties":{"id":{"type":"string","format":"uuid","description":"The membership."},"user_id":{"type":"string","format":"uuid"},"email":{"type":"string"},"name":{"type":["string","null"]},"role":{"type":"string","enum":["owner","admin","staff","readonly"]},"last_login_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"you":{"type":"boolean"}}},"Invitation":{"type":"object","required":["id","email","role","created_at","expires_at"],"properties":{"id":{"type":"string","format":"uuid"},"email":{"type":"string"},"role":{"type":"string","enum":["owner","admin","staff","readonly"]},"invited_by":{"type":["string","null"],"description":"Email of whoever invited."},"created_at":{"type":"string","format":"date-time"},"expires_at":{"type":"string","format":"date-time"}}},"ApiKey":{"type":"object","required":["id","prefix","name","scopes","property_ids","all_properties","created_at","status"],"properties":{"id":{"type":"string","format":"uuid"},"prefix":{"type":"string"},"name":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"property_ids":{"type":"array","items":{"type":"string","format":"uuid"}},"all_properties":{"type":"boolean","description":"True when property_ids is empty: the key may use every property of the organization."},"last_used_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"revoked_at":{"type":["string","null"],"format":"date-time"},"status":{"type":"string","enum":["active","revoked","expired"]},"key":{"type":"string","description":"The whole key. Only in the answer to its creation."}}},"SetupProgress":{"type":"object","required":["steps","current","percent","complete"],"properties":{"steps":{"type":"array","items":{"type":"object","required":["id","done","required","detail"],"properties":{"id":{"type":"string"},"done":{"type":"boolean"},"required":{"type":"boolean"},"detail":{"type":"string"}}}},"current":{"type":["string","null"]},"percent":{"type":"integer"},"complete":{"type":"boolean"}}},"Membership":{"type":"object","required":["organization_id","name","slug","role"],"properties":{"organization_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"slug":{"type":"string"},"role":{"type":"string","enum":["owner","admin","staff","readonly"]}}},"Session":{"type":"object","required":["session_token","expires_at","user","is_new_user","organizations","organization_id","role"],"properties":{"session_token":{"type":"string","description":"kses_<8 hex>_<32 hex>; shown only here. Send it as a Bearer token."},"expires_at":{"type":"string","format":"date-time","description":"The latest it can last (it also ends after 14 days without use)."},"user":{"$ref":"#/components/schemas/User"},"is_new_user":{"type":"boolean"},"organizations":{"type":"array","items":{"$ref":"#/components/schemas/Membership"}},"organization_id":{"type":["string","null"],"format":"uuid"},"role":{"type":["string","null"]}}},"User":{"type":"object","required":["id","email","name","has_password"],"properties":{"id":{"type":"string","format":"uuid"},"email":{"type":"string"},"name":{"type":["string","null"]},"has_password":{"type":"boolean"},"terms_version":{"type":["string","null"],"description":"The version of the terms the person agreed to when signing in (null = never)."}}},"Me":{"type":"object","required":["user","organizations","organization_id","role","scopes"],"properties":{"user":{"$ref":"#/components/schemas/User"},"organizations":{"type":"array","items":{"$ref":"#/components/schemas/Membership"}},"organization_id":{"type":["string","null"],"format":"uuid"},"role":{"type":["string","null"]},"scopes":{"type":"array","items":{"type":"string"}}}},"PropertyStatus":{"type":"object","required":["verdict","evaluated_at","last_beat_at","findings"],"properties":{"verdict":{"type":"string","enum":["ok","degraded","critical"]},"evaluated_at":{"type":"string","format":"date-time"},"last_beat_at":{"type":["string","null"],"format":"date-time","description":"When the periodic monitor last ran (its own heartbeat)."},"findings":{"type":"array","items":{"type":"object","required":["kind","subject","severity","summary","detail"],"properties":{"kind":{"type":"string","enum":["unconfirmed_feed","inbound_backlog","connection_unhealthy","webhook_dead","decision_waiting","heartbeat_stale"]},"subject":{"type":"string","description":"What it is about when there can be several (a connection id); empty otherwise."},"severity":{"type":"string","enum":["warning","critical"]},"summary":{"type":"string"},"detail":{"type":"object"}}}}}},"Alert":{"type":"object","required":["id","kind","subject","severity","status","summary","detail","opened_at","last_seen_at","resolved_at"],"properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string"},"subject":{"type":"string"},"severity":{"type":"string","enum":["warning","critical"]},"status":{"type":"string","enum":["open","resolved"]},"summary":{"type":"string"},"detail":{"type":"object"},"opened_at":{"type":"string","format":"date-time"},"last_seen_at":{"type":"string","format":"date-time"},"resolved_at":{"type":["string","null"],"format":"date-time"}}},"WebhookEndpoint":{"type":"object","required":["id","property_id","url","status","secret_fingerprint","created_at","updated_at"],"properties":{"id":{"type":"string","format":"uuid"},"property_id":{"type":"string","format":"uuid"},"url":{"type":"string"},"status":{"type":"string","enum":["active","paused"]},"secret_fingerprint":{"type":"string","description":"Changes when the secret changes; reveals nothing about it."},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"WebhookEndpointWithSecret":{"allOf":[{"$ref":"#/components/schemas/WebhookEndpoint"},{"type":"object","required":["secret"],"properties":{"secret":{"type":"string","description":"The signing secret (whsec_…). Shown only in this response."}}}]},"WebhookDelivery":{"type":"object","required":["id","endpoint_id","event","seq","status","attempts","next_attempt_at","last_attempt_at","last_status","last_error","created_at","delivered_at"],"properties":{"id":{"type":"string","format":"uuid","description":"Also the X-Channel-Manager-Delivery header; the same on every attempt."},"endpoint_id":{"type":"string","format":"uuid"},"event":{"type":"string","enum":["reservation.feed"]},"seq":{"type":"integer","description":"The feed number this message is about."},"status":{"type":"string","enum":["pending","delivered","dead"]},"attempts":{"type":"integer"},"next_attempt_at":{"type":["string","null"],"format":"date-time"},"last_attempt_at":{"type":["string","null"],"format":"date-time"},"last_status":{"type":["integer","null"],"description":"The HTTP status of the last attempt","when there was one.":null},"last_error":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"delivered_at":{"type":["string","null"],"format":"date-time"}}},"Decision":{"type":"object","required":["id","property_id","connection_id","kind","status","message_id","reservation_id","external_id","summary","detail","resolution","created_at","resolved_at","actions"],"properties":{"id":{"type":"string","format":"uuid"},"property_id":{"type":"string","format":"uuid"},"connection_id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["missed_cancellation","no_price","unmapped","bad_data","revision_after_cancel","unreadable_message"]},"status":{"type":"string","enum":["open","resolved","dismissed"]},"message_id":{"type":"string","format":"uuid"},"reservation_id":{"type":["string","null"],"format":"uuid"},"external_id":{"type":["string","null"],"description":"The channel's booking number."},"summary":{"type":"string","description":"What happened and what can be done","in words.":null},"detail":{"type":"object","description":"Kind-specific facts: reason; for missed_cancellation also candidates."},"resolution":{"type":["string","null"],"description":"How it ended; begins with auto: when its cause went away by itself."},"created_at":{"type":"string","format":"date-time"},"resolved_at":{"type":["string","null"],"format":"date-time"},"actions":{"type":"array","items":{"type":"string"},"description":"What can be done about it now; empty once it is settled."}}},"AuditRun":{"type":"object","required":["id","connection_id","arrival_from","arrival_to","status","checked","matched","repaired","orphans","error","created_at","finished_at"],"properties":{"id":{"type":"string","format":"uuid"},"connection_id":{"type":"string","format":"uuid"},"arrival_from":{"type":"string","format":"date"},"arrival_to":{"type":"string","format":"date"},"status":{"type":"string","enum":["queued","running","completed","failed","unsupported"],"description":"failed: the audit was tried and did not finish (see error); unsupported: the channel has no way to list its bookings."},"checked":{"type":"integer"},"matched":{"type":"integer"},"repaired":{"type":"integer","description":"Bookings the channel holds that Antero Connect did not have or had differently; they were stored and are being processed."},"orphans":{"type":"integer","description":"Active Antero Connect reservations in the range that the channel did not list. Reported, never cancelled."},"error":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"finished_at":{"type":["string","null"],"format":"date-time"},"findings":{"type":"array","description":"Only on the single-audit read.","items":{"type":"object","required":["external_id","state","detail"],"properties":{"external_id":{"type":"string"},"state":{"type":"string","enum":["repaired","orphan"]},"detail":{"type":"string"}}}}}},"Closure":{"type":"object","required":["id","property_id","connection_id","room_type_id","sub_channel","date_from","date_to","reason","created_at","lifted_at","status","verified","unreachable_sub_channels"],"properties":{"id":{"type":"string","format":"uuid"},"property_id":{"type":"string","format":"uuid"},"connection_id":{"type":"string","format":"uuid"},"room_type_id":{"type":"string","format":"uuid"},"sub_channel":{"type":"string","description":"Empty = every OTA the channel can close."},"date_from":{"type":"string","format":"date"},"date_to":{"type":"string","format":"date"},"reason":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"lifted_at":{"type":["string","null"],"format":"date-time"},"status":{"type":"string","enum":["pending","sent","proven","disputed","blocked","expired","lifted"]},"verified":{"type":"boolean","description":"True only when the channel was read back and shows every day closed."},"unreachable_sub_channels":{"type":"array","items":{"type":"string"},"description":"OTAs that closing every OTA does not reach on this channel."}}},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","description":"Stable; never translated."},"message":{"type":"string","description":"For humans; may change."},"request_id":{"type":"string"},"alternatives":{"type":"array","items":{"type":"string"},"description":"What could be asked for instead (e.g. close_all), when the request cannot be done as asked."},"current_version":{"type":"integer","format":"int64","description":"With 409 stale_version / version_conflict: the newest pms_version Antero Connect accepted for that kind of push. A PMS that lost its counter continues from it (it pushes current_version + 1)."}}}}},"AuthorityMode":{"type":"string","enum":["pms_authoritative","channel_manager_authoritative"],"description":"`pms_authoritative`: the PMS decides availability and pushes it to Antero Connect.\n`channel_manager_authoritative`: for properties without a PMS, Antero Connect holds the inventory.\n"},"Status":{"type":"string","enum":["active","archived"]},"Property":{"type":"object","required":["id","name","timezone","currency","authority_mode","status","created_at","updated_at"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"timezone":{"type":"string","examples":["Asia/Jakarta"],"description":"IANA time zone name."},"currency":{"type":"string","examples":["USD"],"description":"ISO 4217 code, 3 capital letters. Fixed after creation."},"authority_mode":{"$ref":"#/components/schemas/AuthorityMode"},"status":{"$ref":"#/components/schemas/Status"},"address":{"type":"string","maxLength":300,"description":"Street address. Empty when not set."},"city":{"type":"string","maxLength":120},"country":{"type":"string","pattern":"^([A-Z]{2})?$","description":"ISO 3166-1 alpha-2, two capital letters (for example `ID`). Empty when not set."},"phone":{"type":"string","maxLength":40},"email":{"type":"string","maxLength":200,"description":"The address a guest can write to. Empty when not set."},"website":{"type":"string","maxLength":300,"description":"Starts with `https://` or `http://`."},"check_in_time":{"type":"string","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$","examples":["14:00"],"description":"From when a guest may check in, `HH:MM` in the property's time zone. Default `14:00`."},"check_out_time":{"type":"string","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$","examples":["11:00"],"description":"By when a guest checks out, `HH:MM`. Default `11:00`."},"sender_name":{"type":"string","maxLength":100,"description":"The name guest emails come from. Empty: the property's name."},"reply_to":{"type":"string","maxLength":200,"description":"Where a guest's reply to an email goes. Empty: the property's `email`."},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"PromoCodeInput":{"type":"object","additionalProperties":false,"required":["kind"],"properties":{"code":{"type":"string","description":"3 to 20 of `A-Z`, `0-9`, `-`, `_`; capitals are made of small ones. Required when making a code; ignored when changing one (it cannot change)."},"kind":{"type":"string","enum":["percent","amount"]},"basis_points":{"type":"integer","minimum":1,"maximum":10000,"description":"For `percent`: hundredths of a percent (1000 = 10.00%)."},"amount":{"type":"integer","minimum":1,"format":"int64","description":"For `amount`: in the smallest unit of the currency, off the whole stay."},"arrive_from":{"type":["string","null"],"format":"date"},"arrive_to":{"type":["string","null"],"format":"date"},"min_nights":{"type":"integer","minimum":1,"maximum":365,"default":1},"max_uses":{"type":["integer","null"],"minimum":1},"active":{"type":"boolean","default":true}}},"PromoCode":{"type":"object","required":["id","property_id","code","kind","arrive_from","arrive_to","min_nights","max_uses","uses","active"],"properties":{"id":{"type":"string","format":"uuid"},"property_id":{"type":"string","format":"uuid"},"code":{"type":"string"},"kind":{"type":"string","enum":["percent","amount"]},"basis_points":{"type":"integer"},"amount":{"type":"integer","format":"int64"},"arrive_from":{"type":["string","null"],"format":"date"},"arrive_to":{"type":["string","null"],"format":"date"},"min_nights":{"type":"integer"},"max_uses":{"type":["integer","null"]},"uses":{"type":"integer","description":"How many bookings used it."},"active":{"type":"boolean"}}},"GuestRow":{"type":"object","required":["email","name","country","stays","cancelled","first_arrival","last_arrival","next_arrival"],"properties":{"email":{"type":"string","description":"In lower case."},"name":{"type":"string"},"country":{"type":"string"},"stays":{"type":"integer"},"cancelled":{"type":"integer"},"first_arrival":{"type":["string","null"],"format":"date"},"last_arrival":{"type":["string","null"],"format":"date"},"next_arrival":{"type":["string","null"],"format":"date"}}},"GuestStay":{"type":"object","required":["id","reference","source","status","arrival","departure"],"properties":{"id":{"type":"string","format":"uuid"},"reference":{"type":"string","description":"The booking number."},"source":{"type":"string","enum":["channel","manual"]},"status":{"type":"string","enum":["pending","confirmed","cancelled"]},"arrival":{"type":["string","null"],"format":"date"},"departure":{"type":["string","null"],"format":"date"},"guest":{"type":"object","description":"What is kept about the guest. Only in an export; an erasure never repeats it."}}},"ImportTemplateBody":{"type":"object","additionalProperties":false,"required":["fields"],"properties":{"fields":{"type":"object","additionalProperties":{"type":"string"},"description":"An import field (`external_id`, `arrival`, `departure`, `guest_name`, `room_type`, `status`, `total`, ...) to the header of its column in the file."},"date_format":{"type":"string","enum":["dmy","mdy","ymd"]},"decimal":{"type":"string","enum":[".",","]},"statuses":{"type":"object","additionalProperties":{"type":"string","enum":["confirmed","cancelled","skip"]},"description":"A status value (lower case, single spaces) to what it means."},"room_types":{"type":"object","additionalProperties":{"type":"string"},"description":"A value of the room column (lower case, single spaces) to the NAME of a room type."},"default_room_type":{"type":"string","description":"The name of the room type for a file with no room column."}}},"ImportTemplate":{"type":"object","required":["id","name","template","created_at","updated_at"],"properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"template":{"$ref":"#/components/schemas/ImportTemplateBody"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"ImportBatch":{"type":"object","required":["id","property_id","created_at","filename","status","rows","imported","duplicates","skipped","overbooked_nights","undone_at"],"properties":{"id":{"type":"string","format":"uuid"},"property_id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"filename":{"type":"string"},"status":{"type":"string","enum":["imported","undone"]},"rows":{"type":"integer"},"imported":{"type":"integer"},"duplicates":{"type":"integer"},"skipped":{"type":"integer","description":"Rows left out: a status chosen as `skip`, or rows with errors when `skip_errors` was on."},"overbooked_nights":{"type":"integer"},"undone_at":{"type":["string","null"],"format":"date-time"}}},"ImportInspection":{"type":"object","required":["sheets","sheet","header_row","rows","columns","mapping","date_format","date_ambiguous","decimal","statuses"],"properties":{"sheets":{"type":"array","items":{"type":"string"}},"sheet":{"type":"string"},"header_row":{"type":"integer"},"rows":{"type":"integer","description":"Reservations in the file (rows under the header)."},"columns":{"type":"array","items":{"type":"object","required":["index","name","samples","distinct","distinct_total"],"properties":{"index":{"type":"integer"},"name":{"type":"string"},"samples":{"type":"array","items":{"type":"string"}},"distinct":{"type":["array","null"],"items":{"type":"string"},"description":"Every different value when there are at most 60; null when there are more."},"distinct_total":{"type":"integer"}}}},"mapping":{"type":"object","additionalProperties":{"type":"integer"},"description":"Guessed: field to column index."},"date_format":{"type":"string","enum":["dmy","mdy","ymd"]},"date_ambiguous":{"type":"boolean"},"decimal":{"type":"string","enum":[".",","]},"statuses":{"type":"object","additionalProperties":{"type":"string"},"description":"Guessed: a status value (lower case) to `confirmed` or `cancelled`; empty = the person must say."}}},"ImportResult":{"type":"object","required":["dry_run","blocked","summary","issues","issues_truncated"],"properties":{"batch_id":{"type":"string","format":"uuid","description":"Only when something was imported."},"dry_run":{"type":"boolean"},"blocked":{"type":"boolean","description":"Not a dry run, but rows have errors and `skip_errors` was off: nothing was imported."},"summary":{"type":"object","required":["rows","to_import","duplicates","skipped","errors","past","current","future","cancelled","no_price","overbooked_nights"],"properties":{"rows":{"type":"integer"},"to_import":{"type":"integer","description":"Good rows (imported, when it is not a dry run)."},"duplicates":{"type":"integer"},"skipped":{"type":"integer"},"errors":{"type":"integer"},"past":{"type":"integer"},"current":{"type":"integer"},"future":{"type":"integer"},"cancelled":{"type":"integer"},"no_price":{"type":"integer"},"overbooked_nights":{"type":"integer"}}},"issues":{"type":"array","description":"What is wrong or worth knowing about a row, at most 300.","items":{"type":"object","required":["row","message","severity"],"properties":{"row":{"type":"integer","description":"The row of the sheet, as a spreadsheet numbers it."},"field":{"type":"string"},"message":{"type":"string"},"severity":{"type":"string","enum":["error","warning"]}}}},"issues_truncated":{"type":"boolean"}}},"BillingLine":{"type":"object","required":["id","at","kind","description","credit","debit","balance"],"properties":{"id":{"type":"string","format":"uuid"},"at":{"type":"string","format":"date-time"},"kind":{"type":"string","enum":["topup","charge","adjustment","credit"]},"description":{"type":"string"},"credit":{"type":"integer","format":"int64","description":"Minor units added to the balance (0 for a debit)."},"debit":{"type":"integer","format":"int64","description":"Minor units taken from the balance (0 for a credit)."},"balance":{"type":"integer","format":"int64","description":"The balance after this line."},"period":{"type":"string","pattern":"^[0-9]{4}-[0-9]{2}$","description":"The month a charge is for."},"reference":{"type":"string","description":"The payment this line records."}}},"Account":{"type":"object","properties":{"closed":{"type":"boolean"},"closed_at":{"type":["string","null"],"format":"date-time"},"purge_after":{"type":["string","null"],"format":"date-time","description":"When the data is deleted for good."},"reason":{"type":"string","description":"owner, or inactive."},"terms_version":{"type":"string","description":"The version of the terms in force."},"days_left":{"type":"integer","description":"While closed","the days until the data is deleted.":null}}},"Ticket":{"type":"object","required":["id","number","subject","category","status","priority","blocking","property_id","created_by_name","created_at","last_activity_at"],"properties":{"id":{"type":"string","format":"uuid"},"number":{"type":"integer","description":"The number people say: `T-1042`."},"subject":{"type":"string"},"category":{"type":"string","enum":["channel","availability","bookings","billing","other"]},"status":{"type":"string","enum":["open","waiting_customer","solved","closed"],"description":"`waiting_customer`: we answered and wait for the hotel."},"priority":{"type":"string","enum":["normal","urgent"]},"blocking":{"type":"boolean"},"property_id":{"type":["string","null"],"format":"uuid"},"created_by_name":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"last_activity_at":{"type":"string","format":"date-time"},"context":{"type":"object","additionalProperties":true,"description":"The technical snapshot taken when the ticket was opened (plan, property, connections with their health). Only in the single-ticket answer."},"messages":{"type":"array","description":"Only in the single-ticket answer, oldest first.","items":{"type":"object","required":["id","author_kind","author_name","body","created_at","you","attachments"],"properties":{"id":{"type":"string","format":"uuid"},"author_kind":{"type":"string","enum":["customer","operator","system"]},"author_name":{"type":["string","null"]},"body":{"type":"string","description":"The text. A message of `author_kind` `system` carries a code instead of a text (`auto_solved`: nobody answered for ten days, so it was marked solved); the panel words it in the person's language."},"created_at":{"type":"string","format":"date-time"},"you":{"type":"boolean","description":"Written by the person asking."},"attachments":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Pictures on the message; read each with `GET /v1/support/attachments/{id}`."}}}}}},"Billing":{"type":"object","required":["status","grace_ends_at","currency","balance","rooms","monthly_price","tier_max_rooms","quote_required","price_missing","accrued_not_charged","next_charge_on","plan","trial_ends_at","trial_state","trial_days_left","usage"],"properties":{"status":{"type":"string","enum":["trial","active","grace","locked"]},"grace_ends_at":{"type":["string","null"],"format":"date-time","description":"When the grace period ends and the account is locked. Kept while locked: empty then means the trial ended with no credit."},"currency":{"type":"string","pattern":"^[A-Z]{3}$","description":"The billing currency (ISO 4217)."},"balance":{"type":"integer","format":"int64","description":"Minor units of the currency; below zero is owed."},"rooms":{"type":"integer"},"monthly_price":{"type":"integer","format":"int64"},"tier_max_rooms":{"type":"integer"},"max_request":{"description":"The migration to Antero Max the owner asked for, while it is open. Null otherwise.","type":["object","null"],"properties":{"status":{"type":"string","enum":["requested","scheduled"]},"created_at":{"type":"string","format":"date-time"}}},"available":{"type":"integer","description":"The balance after the fees already worked out this month (`balance` minus `accrued_not_charged`): what is really left."},"days_left":{"type":["integer","null"],"description":"For how many more days `available` covers the fee at today's price. null when there is no price."},"extra_room_price":{"type":"integer","description":"What each extra room adds a month, in the smallest unit of `currency`. 0 when there are no extra rooms."},"payment_providers":{"type":"array","description":"The providers an owner or admin can add credit with (`duitku`, `doku`). Empty unless the account is billed in rupiah, and on a server with none set up.","items":{"type":"string","enum":["duitku","doku"]}},"plan_prices":{"type":"array","description":"What each plan costs, from the price list in the currency of the account. `monthly` is the price of the smallest tier (`up_to_rooms` rooms); `extra_per_room` is what each room above the largest tier adds a month (0: the price is agreed instead).","items":{"type":"object","required":["plan","monthly","up_to_rooms","extra_per_room"],"properties":{"plan":{"type":"string","enum":["light","connect","max"]},"monthly":{"type":"integer","format":"int64"},"up_to_rooms":{"type":"integer"},"extra_per_room":{"type":"integer","format":"int64"}}}},"extra_rooms":{"type":"integer","description":"Rooms above the largest tier that a plan charges by the room (Connect and Max: each adds a set amount a month). 0 when there are none or the plan does not price them."},"quote_required":{"type":"boolean"},"price_missing":{"type":"boolean"},"accrued_not_charged":{"type":"integer","format":"int64"},"next_charge_on":{"type":"string","format":"date"},"plan":{"type":"string","enum":["open_api","light","connect","max"]},"trial_ends_at":{"type":"string","format":"date-time"},"trial_state":{"type":"string","enum":["trial","ended"]},"trial_days_left":{"type":"integer","minimum":0},"usage":{"type":"object","required":["properties","room_types","connections","members"],"properties":{"properties":{"type":"integer"},"room_types":{"type":"integer"},"connections":{"type":"integer"},"members":{"type":"integer"}}}}},"PropertyCreate":{"type":"object","additionalProperties":false,"required":["name","timezone"],"properties":{"name":{"type":"string","minLength":1},"timezone":{"type":"string"},"currency":{"type":"string","pattern":"^[A-Z]{3}$","default":"USD","description":"ISO 4217 code. Defaults to USD when omitted. Cannot be changed later."},"authority_mode":{"$ref":"#/components/schemas/AuthorityMode"}}},"PropertyUpdate":{"type":"object","additionalProperties":false,"minProperties":1,"properties":{"name":{"type":"string","minLength":1},"timezone":{"type":"string"},"authority_mode":{"$ref":"#/components/schemas/AuthorityMode"},"status":{"$ref":"#/components/schemas/Status"},"address":{"type":"string","maxLength":300,"description":"Street address. Empty when not set."},"city":{"type":"string","maxLength":120},"country":{"type":"string","pattern":"^([A-Z]{2})?$","description":"ISO 3166-1 alpha-2, two capital letters (for example `ID`). Empty when not set."},"phone":{"type":"string","maxLength":40},"email":{"type":"string","maxLength":200,"description":"The address a guest can write to. Empty when not set."},"website":{"type":"string","maxLength":300,"description":"Starts with `https://` or `http://`."},"check_in_time":{"type":"string","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$","examples":["14:00"],"description":"From when a guest may check in, `HH:MM` in the property's time zone. Default `14:00`."},"check_out_time":{"type":"string","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$","examples":["11:00"],"description":"By when a guest checks out, `HH:MM`. Default `11:00`."},"sender_name":{"type":"string","maxLength":100,"description":"The name guest emails come from. Empty: the property's name."},"reply_to":{"type":"string","maxLength":200,"description":"Where a guest's reply to an email goes. Empty: the property's `email`."}}},"BankAccount":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"property_id":{"type":"string","format":"uuid"},"bank":{"type":"string"},"holder":{"type":"string"},"number":{"type":"string"},"note":{"type":["string","null"]},"status":{"type":"string","enum":["active","inactive"]},"created_at":{"type":"string","format":"date-time"}}},"HousekeepingRoom":{"type":"object","required":["id","number","room_type_id","room_type","status","note","occupied","arriving","departing"],"properties":{"id":{"type":"string","format":"uuid"},"number":{"type":"string"},"room_type_id":{"type":"string","format":"uuid"},"room_type":{"type":"string"},"status":{"type":"string","enum":["dirty","clean","inspected","out_of_order"]},"note":{"type":"string"},"status_at":{"type":["string","null"],"format":"date-time"},"occupied":{"type":"boolean"},"arriving":{"type":"boolean"},"departing":{"type":"boolean"}}},"GuestIdentity":{"type":"object","required":["id","email","has_photo","updated_at"],"properties":{"id":{"type":"string","format":"uuid"},"email":{"type":"string"},"doc_type":{"type":["string","null"],"enum":["passport","id_card","driving_licence","other",null]},"doc_number":{"type":["string","null"]},"nationality":{"type":["string","null"]},"birth_date":{"type":["string","null"],"format":"date"},"has_photo":{"type":"boolean"},"updated_at":{"type":"string","format":"date-time"}}},"Transfer":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"reservation_id":{"type":"string","format":"uuid"},"amount":{"type":"integer","description":"The smallest unit of `currency`."},"currency":{"type":"string"},"status":{"type":"string","enum":["awaiting","confirmed","rejected"]},"method":{"type":"string","enum":["bank_transfer","cash","card","other"],"description":"How the money was paid."},"note":{"type":["string","null"]},"has_proof":{"type":"boolean"},"confirmed_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"}}},"PaymentConnection":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"property_id":{"type":"string","format":"uuid"},"gateway":{"type":"string"},"name":{"type":"string"},"sandbox":{"type":"boolean"},"status":{"type":"string","enum":["active","paused"]},"has_credentials":{"type":"boolean"},"credentials_fingerprint":{"type":["string","null"]},"hook_prefix":{"type":["string","null"]},"hook_url":{"type":"string","description":"Only for a caller who may change connections."},"webhook_registered":{"type":"boolean","description":"Antero Connect told the gateway its address through the gateway's API; the hotel set nothing up there."},"last_event_at":{"type":["string","null"],"format":"date-time","description":"When the gateway last sent a signed message; proof that the way back works."},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"Payment":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"reservation_id":{"type":["string","null"],"format":"uuid","description":"null for a test payment."},"purpose":{"type":"string","enum":["reservation","test"]},"connection_id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["deposit","balance","full","custom"]},"amount":{"type":"integer","description":"The smallest unit of `currency`."},"currency":{"type":"string"},"status":{"type":"string","enum":["pending","paid","failed","expired","cancelled","refunded"]},"checkout_url":{"type":["string","null"],"description":"The gateway's hosted page; send the guest here."},"expires_at":{"type":["string","null"],"format":"date-time"},"paid_at":{"type":["string","null"],"format":"date-time"},"failure":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"}}},"RoomType":{"type":"object","required":["id","property_id","name","code","total_units","max_occupancy","status","created_at","updated_at"],"properties":{"id":{"type":"string","format":"uuid"},"property_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"code":{"type":"string"},"total_units":{"type":"integer","minimum":0,"description":"How many physical rooms of this type."},"max_occupancy":{"type":"integer","minimum":1},"included_guests":{"type":["integer","null"],"minimum":1,"maximum":50,"description":"The guests the price covers. null: no extra charge. Each adult above this adds `extra_adult_fee` a night, each child above what is left of the places adds `extra_child_fee` (adults take the places first; with several rooms the places add up). For the hotel's own bookings (staff and the booking page); a booking from a channel is priced by the channel."},"extra_adult_fee":{"type":"integer","minimum":0,"description":"A night","in the smallest unit of the property's currency.":null},"extra_child_fee":{"type":"integer","minimum":0,"description":"A night","in the smallest unit of the property's currency.":null},"status":{"$ref":"#/components/schemas/Status"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"RoomTypeCreate":{"type":"object","additionalProperties":false,"required":["name","code","total_units"],"properties":{"name":{"type":"string","minLength":1},"code":{"type":"string","minLength":1},"total_units":{"type":"integer","minimum":0},"max_occupancy":{"type":"integer","minimum":1,"default":2},"included_guests":{"type":"integer","minimum":1,"maximum":50},"extra_adult_fee":{"type":"integer","minimum":0},"extra_child_fee":{"type":"integer","minimum":0}}},"RoomTypeUpdate":{"type":"object","additionalProperties":false,"minProperties":1,"properties":{"name":{"type":"string","minLength":1},"total_units":{"type":"integer","minimum":0},"max_occupancy":{"type":"integer","minimum":1},"included_guests":{"type":"integer","minimum":0,"maximum":50,"description":"0 takes the extra-guest charge away."},"extra_adult_fee":{"type":"integer","minimum":0},"extra_child_fee":{"type":"integer","minimum":0},"status":{"$ref":"#/components/schemas/Status"}}},"RatePlan":{"type":"object","required":["id","property_id","room_type_id","name","code","currency","parent_rate_plan_id","derivation","status","created_at","updated_at"],"properties":{"id":{"type":"string","format":"uuid"},"property_id":{"type":"string","format":"uuid"},"room_type_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"code":{"type":"string"},"currency":{"type":"string"},"parent_rate_plan_id":{"type":["string","null"],"format":"uuid"},"derivation":{"oneOf":[{"$ref":"#/components/schemas/Derivation"},{"type":"null"}],"description":"How this plan's price follows its parent's; `null` for a plan that is not derived."},"status":{"$ref":"#/components/schemas/Status"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"RatePlanCreate":{"type":"object","additionalProperties":false,"required":["room_type_id","name","code"],"properties":{"room_type_id":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1},"code":{"type":"string","minLength":1},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"parent_rate_plan_id":{"type":["string","null"],"format":"uuid"},"derivation":{"$ref":"#/components/schemas/DerivationInput"}}},"RatePlanUpdate":{"type":"object","additionalProperties":false,"minProperties":1,"properties":{"name":{"type":"string","minLength":1},"status":{"$ref":"#/components/schemas/Status"},"derivation":{"$ref":"#/components/schemas/DerivationInput"}}},"Derivation":{"type":"object","required":["type","round_to"],"description":"The price is the parent's price adjusted by the rule and then rounded **half up** to a multiple of\n`round_to` (minor units). A result below zero leaves the day without a price (`amount` null).\n","properties":{"type":{"type":"string","enum":["percent","amount"]},"basis_points":{"type":"integer","minimum":-9999,"maximum":100000,"description":"For `percent`: 1000 = +10.00%, -1500 = -15.00%."},"amount":{"type":"integer","description":"For `amount`: signed minor units added to the parent's price."},"round_to":{"type":"integer","minimum":1,"maximum":1000000000}}},"DerivationInput":{"type":"object","additionalProperties":false,"required":["type"],"description":"Give `basis_points` for type `percent`, or `amount` for type `amount`, never both. `round_to` defaults to 1.","properties":{"type":{"type":"string","enum":["percent","amount"]},"basis_points":{"type":"integer","minimum":-9999,"maximum":100000},"amount":{"type":"integer"},"round_to":{"type":"integer","minimum":1,"maximum":1000000000}}},"PushResult":{"type":"object","required":["changed_days","unchanged_days","derived_changed_days","pms_version","released_holds"],"properties":{"changed_days":{"type":"integer","minimum":0},"derived_changed_days":{"type":"integer","minimum":0,"description":"Days of derived rate plans whose price changed because of this push."},"unchanged_days":{"type":"integer","minimum":0,"description":"Days that already had the pushed value","or all days of a retry.":null},"pms_version":{"type":["integer","null"]},"released_holds":{"type":"integer","minimum":0,"description":"How many temporary holds this push released through feed_applied_through (availability pushes only; 0 otherwise)."}}},"DateRangeItem":{"type":"object","required":["date_from","date_to"],"properties":{"date_from":{"type":"string","format":"date"},"date_to":{"type":"string","format":"date","description":"Inclusive; at most 540 days after date_from."}}},"AvailabilityPut":{"type":"object","additionalProperties":false,"required":["items"],"properties":{"pms_version":{"type":"integer","minimum":1,"description":"Required for pms_authoritative properties. Must not decrease."},"feed_applied_through":{"type":"integer","minimum":0,"description":"The number of the reservation feed (GET …/reservation-feed) that these numbers already count. Required on a pms_authoritative property that has a feed; never above the feed's newest number (400 feed_applied_through_ahead), never below what was confirmed before (409 stale_feed_applied_through). Holds up to that number are released in the same transaction."},"items":{"type":"array","minItems":1,"maxItems":500,"items":{"allOf":[{"$ref":"#/components/schemas/DateRangeItem"},{"type":"object","required":["room_type_id","available"],"properties":{"room_type_id":{"type":"string","format":"uuid"},"available":{"type":"integer","minimum":0,"description":"Cannot exceed the room type's total_units."}}}]}}}},"AvailabilityDay":{"type":"object","required":["room_type_id","date","available","total_units","version"],"properties":{"room_type_id":{"type":"string","format":"uuid"},"date":{"type":"string","format":"date"},"available":{"type":"integer"},"total_units":{"type":"integer"},"version":{"type":"integer","description":"Increases only when the value changes."}}},"HeldReservation":{"type":"object","required":["reservation_id","external_id","room_type_id","first_night","last_night","rooms","held_since","feed_seq"],"properties":{"reservation_id":{"type":"string","format":"uuid"},"external_id":{"type":"string"},"room_type_id":{"type":"string","format":"uuid"},"first_night":{"type":"string","format":"date"},"last_night":{"type":"string","format":"date"},"rooms":{"type":"integer"},"held_since":{"type":"string","format":"date-time"},"feed_seq":{"type":"integer","format":"int64"}}},"PriceGuard":{"type":"object","additionalProperties":false,"required":["floor","ceiling"],"properties":{"floor":{"type":["integer","null"],"minimum":0,"description":"Lowest price per night, minor currency units. null = no limit."},"ceiling":{"type":["integer","null"],"minimum":1,"description":"Highest price per night, minor currency units. null = no limit."}}},"RatesPut":{"type":"object","additionalProperties":false,"required":["items"],"properties":{"pms_version":{"type":"integer","minimum":1},"confirm_large_change":{"type":"boolean","description":"Say that a price more than five times above, or less than a fifth of, what the rate plan has now is meant. Without it such a price is refused with 409 price_change_large. It does not lift the price limits (409 price_guard)."},"items":{"type":"array","minItems":1,"maxItems":500,"items":{"allOf":[{"$ref":"#/components/schemas/DateRangeItem"},{"type":"object","required":["rate_plan_id","amount"],"properties":{"rate_plan_id":{"type":"string","format":"uuid"},"amount":{"type":"integer","minimum":0,"description":"Minor units of the rate plan's currency (ISO 4217): USD 120.00 is 12000."}}}]}}}},"RateDay":{"type":"object","required":["rate_plan_id","date","amount","currency","version"],"properties":{"rate_plan_id":{"type":"string","format":"uuid"},"date":{"type":"string","format":"date"},"amount":{"type":["integer","null"]},"currency":{"type":"string"},"version":{"type":"integer"}}},"RestrictionsPut":{"type":"object","additionalProperties":false,"required":["items"],"properties":{"pms_version":{"type":"integer","minimum":1},"items":{"type":"array","minItems":1,"maxItems":500,"items":{"allOf":[{"$ref":"#/components/schemas/DateRangeItem"},{"type":"object","required":["rate_plan_id","min_stay","max_stay","closed_to_arrival","closed_to_departure","stop_sell"],"properties":{"rate_plan_id":{"type":"string","format":"uuid"},"min_stay":{"type":["integer","null"],"minimum":1,"maximum":365},"max_stay":{"type":["integer","null"],"minimum":1,"maximum":365,"description":"Not less than min_stay."},"closed_to_arrival":{"type":"boolean"},"closed_to_departure":{"type":"boolean"},"stop_sell":{"type":"boolean"}}}]}}}},"RestrictionDay":{"type":"object","required":["rate_plan_id","date","min_stay","max_stay","closed_to_arrival","closed_to_departure","stop_sell","effective_stop_sell","version"],"properties":{"rate_plan_id":{"type":"string","format":"uuid"},"date":{"type":"string","format":"date"},"min_stay":{"type":["integer","null"]},"max_stay":{"type":["integer","null"]},"closed_to_arrival":{"type":"boolean"},"closed_to_departure":{"type":"boolean"},"stop_sell":{"type":"boolean"},"effective_stop_sell":{"type":"boolean","description":"`stop_sell` of this plan OR of its parent or grandparent on the same day. A derived plan's other\nrestrictions are independent of its parent's; stop-sell is the one that is inherited.\n"},"version":{"type":"integer"}}},"Channel":{"type":"object","required":["code","name","kind"],"properties":{"code":{"type":"string","examples":["sim"]},"name":{"type":"string"},"kind":{"type":"string","enum":["ota","aggregator","sim"]}}},"ChannelConnection":{"type":"object","required":["id","property_id","channel_code","name","sandbox","status","remote_property_id","has_credentials","credentials_fingerprint","key_version","created_at","updated_at"],"properties":{"id":{"type":"string","format":"uuid"},"property_id":{"type":"string","format":"uuid"},"channel_code":{"type":"string"},"name":{"type":"string"},"sandbox":{"type":"boolean","description":"`true` for a test connection. Fixed after creation."},"status":{"type":"string","enum":["active","paused"]},"remote_property_id":{"type":["string","null"],"description":"The property's id at the channel."},"has_credentials":{"type":"boolean"},"credentials_fingerprint":{"type":["string","null"],"description":"16 hex characters that change when the credentials change. It reveals nothing about them."},"key_version":{"type":["integer","null"],"description":"Version of the encryption key used."},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"ChannelConnectionCreate":{"type":"object","additionalProperties":false,"required":["channel_code","name"],"properties":{"channel_code":{"type":"string"},"name":{"type":"string","minLength":1,"maxLength":200},"sandbox":{"type":"boolean","default":true},"remote_property_id":{"type":"string","minLength":1,"maxLength":200},"credentials":{"type":"object","minProperties":1,"description":"Channel-specific secrets. Write-only; at most 8 KB."}}},"ChannelConnectionUpdate":{"type":"object","additionalProperties":false,"minProperties":1,"properties":{"name":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","enum":["active","paused"]},"remote_property_id":{"type":"string","minLength":1,"maxLength":200},"credentials":{"type":"object","minProperties":1,"description":"Replaces the stored credentials entirely. Write-only."}}},"Mappings":{"type":"object","additionalProperties":false,"required":["rooms","rates"],"properties":{"rooms":{"type":"array","maxItems":2000,"items":{"type":"object","additionalProperties":false,"required":["room_type_id","remote_room_id"],"properties":{"room_type_id":{"type":"string","format":"uuid"},"remote_room_id":{"type":"string","minLength":1,"maxLength":200}}}},"rates":{"type":"array","maxItems":2000,"items":{"type":"object","additionalProperties":false,"required":["rate_plan_id","remote_rate_id"],"properties":{"rate_plan_id":{"type":"string","format":"uuid"},"remote_rate_id":{"type":"string","minLength":1,"maxLength":200}}}}}},"SyncStatus":{"type":"object","required":["cells","in_sync","confirmed","unverified","unverifiable","pending","waiting","stuck","disputed","open_diffs","blocked_until","consecutive_failures","last_error","last_run_at","last_success_at","last_verified_at","last_full_sync_at"],"properties":{"cells":{"type":"integer","description":"Room-days and rate-days this connection covers."},"in_sync":{"type":"integer","description":"Sent: the channel accepted exactly the desired value."},"confirmed":{"type":"integer","description":"Proven: the channel was read back and holds the desired value."},"unverified":{"type":"integer","description":"Sent and waiting to be read back."},"unverifiable":{"type":"integer","description":"Sent on a channel that cannot be read back; these can never be proven."},"pending":{"type":"integer","description":"Cells waiting to be sent."},"waiting":{"type":"integer","description":"Cells the channel refused or did not understand; left alone for a while before the next try."},"stuck":{"type":"integer","description":"Cells refused five times or more."},"disputed":{"type":"integer","description":"Cells that read back different three times in a row; held until their value changes or a full sync is requested."},"open_diffs":{"type":"integer","description":"Differences found by read-back and not healed or ignored yet."},"blocked_until":{"type":["string","null"],"format":"date-time","description":"The channel asked us to wait until then."},"consecutive_failures":{"type":"integer"},"last_error":{"type":["string","null"]},"last_run_at":{"type":["string","null"],"format":"date-time"},"last_success_at":{"type":["string","null"],"format":"date-time"},"last_verified_at":{"type":["string","null"],"format":"date-time"},"last_full_sync_at":{"type":["string","null"],"format":"date-time"}}},"SyncSummary":{"type":"object","required":["connection_id","property_id","name","status","health","sync"],"properties":{"connection_id":{"type":"string","format":"uuid"},"property_id":{"type":"string","format":"uuid"},"name":{"type":"string"},"status":{"type":"string","description":"The connection's own status: active or paused."},"health":{"type":"string","enum":["unknown","healthy","degraded","down","auth_failed"]},"sync":{"$ref":"#/components/schemas/SyncStatus"}}},"ReconciliationDiff":{"type":"object","required":["id","connection_id","cell_kind","ref_id","date","field","expected","observed","status","occurrences","detected_at","resolved_at"],"properties":{"id":{"type":"string","format":"uuid"},"connection_id":{"type":"string","format":"uuid"},"cell_kind":{"type":"string","enum":["room","rate"]},"ref_id":{"type":"string","format":"uuid","description":"The room type (room) or rate plan (rate)."},"date":{"type":"string","format":"date"},"field":{"type":"string","enum":["avail","amount","min","max","cta","ctd","stop","missing"]},"expected":{"description":"What Antero Connect wanted (any JSON value)."},"observed":{"description":"What the channel reported","or null.":null},"status":{"type":"string","enum":["open","healed","disputed","ignored"]},"occurrences":{"type":"integer","description":"How many read-backs found it."},"detected_at":{"type":"string","format":"date-time"},"resolved_at":{"type":["string","null"],"format":"date-time"}}},"ReconciliationRun":{"type":"object","required":["id","connection_id","kind","started_at","finished_at","cells_checked","cells_matched","cells_mismatched","reads","error"],"properties":{"id":{"type":"string","format":"uuid"},"connection_id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["verify","full"]},"started_at":{"type":"string","format":"date-time"},"finished_at":{"type":["string","null"],"format":"date-time"},"cells_checked":{"type":"integer"},"cells_matched":{"type":"integer"},"cells_mismatched":{"type":"integer"},"reads":{"type":"integer","description":"Calls made to the channel."},"error":{"type":["string","null"]}}},"Capabilities":{"type":"object","required":["closure_method","budget_per_minute","measured_rate_per_minute","rate_source","read_window_days","round_trip_ms","last_probe_at","next_probe_at","last_probe_error","capabilities","inventory_model","closure_scope","sub_channels","mirrors_reservations","booking_search"],"properties":{"inventory_model":{"type":["string","null"],"enum":["state","ledger",null],"description":"state: the channel applies the numbers it is sent and keeps no count (Aiosell). ledger: the channel keeps its own bookings, so reservations must be mirrored into it, moves between room types included (Beds24). Null when this server does not know the channel."},"closure_scope":{"type":["string","null"],"enum":["none","all_only","per_subchannel",null],"description":"What the channel can close: nothing, only every OTA at once, or single OTAs (see sub_channels)."},"sub_channels":{"type":"array","description":"The OTAs behind the connection and whether each can be closed on its own.","items":{"type":"object","required":["code","name","closure"],"properties":{"code":{"type":"string"},"name":{"type":"string"},"closure":{"type":"string","enum":["proven","claimed","proven_failing","unknown"],"description":"proven: measured to work. claimed: the vendor says so. proven_failing: measured NOT to work (answered OK, the OTA stays open). unknown."}}}},"mirrors_reservations":{"type":["boolean","null"],"description":"The adapter mirrors reservation changes into the channel."},"booking_search":{"type":["boolean","null"],"description":"The channel can list its bookings by arrival day, so an audit (POST .../audits) is possible."},"closure_method":{"type":["string","null"],"enum":["stop_sell","zero_availability",null]},"budget_per_minute":{"type":["integer","null"],"description":"The request budget in use."},"measured_rate_per_minute":{"type":["integer","null"],"description":"Calls per minute the last probe found; see rate_source for how far to trust it."},"rate_source":{"type":["string","null"],"enum":["measured","reported",null],"description":"measured: the probe provoked a 429 and counted the calls the channel accepted before it. reported: only what the channel says about itself (a header) is known; the budget never goes above the manifest's starting value on that. null: nothing known."},"read_window_days":{"type":["integer","null"],"description":"The most days one read really returned when asked for more; every read is cut to this width. Null: not measured."},"round_trip_ms":{"type":["integer","null"]},"last_probe_at":{"type":["string","null"],"format":"date-time"},"next_probe_at":{"type":["string","null"],"format":"date-time"},"last_probe_error":{"type":["string","null"]},"capabilities":{"type":"array","items":{"type":"object","required":["name","claimed","measured","effective","measured_at","changed_at"],"properties":{"name":{"type":"string","enum":["stop_sell","min_stay","max_stay","closed_to_arrival","closed_to_departure","read_back"]},"claimed":{"type":"boolean","description":"What the channel's manifest says."},"measured":{"type":["boolean","null"],"description":"What the probe found; null = not measured."},"effective":{"type":"boolean","description":"Claimed and not measured to be missing; what Antero Connect relies on."},"measured_at":{"type":["string","null"],"format":"date-time"},"changed_at":{"type":"string","format":"date-time","description":"When `effective` last changed."}}}}}},"ChannelHealth":{"type":"object","required":["status","reason","since","consecutive_failures","last_success_at","last_error","events"],"properties":{"status":{"type":"string","enum":["unknown","healthy","degraded","down","auth_failed"]},"reason":{"type":"string"},"since":{"type":["string","null"],"format":"date-time","description":"When the status last changed."},"consecutive_failures":{"type":"integer"},"last_success_at":{"type":["string","null"],"format":"date-time"},"last_error":{"type":["string","null"]},"events":{"type":"array","items":{"type":"object","required":["from","to","reason","at"],"properties":{"from":{"type":"string"},"to":{"type":"string"},"reason":{"type":"string"},"at":{"type":"string","format":"date-time"}}}}}},"InboundMessage":{"type":"object","required":["id","connection_id","source","received_at","event_kind","channel_event_type","external_id","payload","redactions","status","status_detail","processed_at"],"properties":{"id":{"type":"string","format":"uuid"},"connection_id":{"type":"string","format":"uuid"},"source":{"type":"string","enum":["webhook","pull"]},"received_at":{"type":"string","format":"date-time"},"event_kind":{"type":"string","enum":["reservation","unknown","unparseable"]},"channel_event_type":{"type":["string","null"],"description":"The channel's own name for the event","when known.":null},"external_id":{"type":["string","null"],"description":"The channel's booking id","when the message carries one.":null},"payload":{"type":"string","description":"The body after redaction."},"redactions":{"type":"integer","description":"How many card values were masked or dropped."},"status":{"type":"string","enum":["received","processing","processed","pending","failed","ignored"]},"status_detail":{"type":["string","null"]},"processed_at":{"type":["string","null"],"format":"date-time"}}},"PmsReservationsPut":{"type":"object","required":["items"],"additionalProperties":false,"properties":{"items":{"type":"array","minItems":1,"maxItems":200,"items":{"type":"object","required":["reference","status","arrival","departure"],"additionalProperties":false,"properties":{"reference":{"type":"string","maxLength":60,"description":"The software's own number for the reservation."},"status":{"type":"string","enum":["confirmed","cancelled"]},"room_type_id":{"type":"string","format":"uuid","description":"Antero Connect's room type. Leave out when the software has none that matches."},"arrival":{"type":"string","format":"date"},"departure":{"type":"string","format":"date"},"rooms":{"type":"integer","minimum":1,"maximum":50,"default":1},"adults":{"type":"integer","minimum":0,"default":1},"children":{"type":"integer","minimum":0,"default":0},"total_amount":{"type":"integer","format":"int64","minimum":0,"description":"Smallest unit of `currency`."},"currency":{"type":"string","description":"ISO 4217. The property's when left out."},"guest":{"$ref":"#/components/schemas/ReservationGuest"},"notes":{"type":"string","maxLength":2000},"payment_status":{"type":"string","enum":["unpaid","deposit","paid"]},"booked_at":{"type":"string","format":"date-time"}}}}}},"ReservationGuest":{"type":"object","required":["name"],"additionalProperties":false,"properties":{"name":{"type":"string","maxLength":200},"email":{"type":"string","maxLength":254},"phone":{"type":"string","maxLength":40},"country":{"type":"string","description":"Two-letter country code.","minLength":2,"maxLength":2}}},"ReservationCreate":{"type":"object","required":["room_type_id","arrival","departure","guest"],"additionalProperties":false,"properties":{"room_type_id":{"type":"string","format":"uuid"},"rate_plan_id":{"type":"string","format":"uuid","description":"The room type's first active plan when left out."},"arrival":{"type":"string","format":"date"},"departure":{"type":"string","format":"date","description":"The day the guest leaves; the nights are those before it. At most 366 nights."},"rooms":{"type":"integer","minimum":1,"maximum":50,"default":1},"adults":{"type":"integer","minimum":1,"default":2},"children":{"type":"integer","minimum":0,"default":0},"total_amount":{"type":"integer","format":"int64","minimum":0,"description":"Smallest unit of the currency; whole stay","all rooms.":null},"guest":{"$ref":"#/components/schemas/ReservationGuest"},"notes":{"type":"string","maxLength":2000},"payment_status":{"type":"string","enum":["unpaid","deposit","paid"],"default":"unpaid"}}},"ReservationUpdate":{"type":"object","additionalProperties":false,"minProperties":1,"properties":{"room_type_id":{"type":"string","format":"uuid"},"rate_plan_id":{"type":"string","format":"uuid"},"arrival":{"type":"string","format":"date"},"departure":{"type":"string","format":"date"},"rooms":{"type":"integer","minimum":1,"maximum":50},"adults":{"type":"integer","minimum":1},"children":{"type":"integer","minimum":0},"total_amount":{"type":"integer","format":"int64","minimum":0},"guest":{"$ref":"#/components/schemas/ReservationGuest"},"notes":{"type":"string","maxLength":2000,"description":"An empty string clears it."},"payment_status":{"type":"string","enum":["unpaid","deposit","paid"]}}},"QuoteRequest":{"type":"object","required":["room_type_id","arrival","departure"],"additionalProperties":false,"properties":{"room_type_id":{"type":"string","format":"uuid"},"rate_plan_id":{"type":"string","format":"uuid"},"arrival":{"type":"string","format":"date"},"departure":{"type":"string","format":"date"},"rooms":{"type":"integer","minimum":1,"maximum":50,"default":1},"adults":{"type":"integer","minimum":1,"maximum":99,"default":1,"description":"With `children`","what a room type that charges for extra guests adds to each night.":null},"children":{"type":"integer","minimum":0,"maximum":99,"default":0}}},"Quote":{"type":"object","required":["currency","rate_plan_id","nights","total","bookable","priced","restrictions"],"properties":{"currency":{"type":"string"},"rate_plan_id":{"type":["string","null"],"format":"uuid"},"nights":{"type":"array","items":{"type":"object","required":["date","amount","available"],"properties":{"date":{"type":"string","format":"date"},"amount":{"type":["integer","null"],"format":"int64","description":"For all the rooms of the request; null when the night has no price."},"available":{"type":"integer","description":"Rooms still free that night."}}}},"total":{"type":["integer","null"],"format":"int64"},"bookable":{"type":"boolean"},"restrictions":{"type":"array","description":"The hotel's own rules this stay would break (see `PUT …/restrictions`). Empty when it breaks none. A hotel may book past its own rules on purpose,\nso they do **not** make `bookable` false here; the public booking page refuses them (`409 not_sellable`).\n","items":{"$ref":"#/components/schemas/Violation"}},"priced":{"type":"boolean"}}},"Reservation":{"type":"object","required":["id","property_id","connection_id","source","booked_via","notes","payment_status","external_id","status","pending_reason","room_type_id","rate_plan_id","arrival","departure","stay_nights","rooms","adults","children","currency","total_amount","nights_derived","collected_by","collected_by_assumed","booked_at","cancelled_at","checked_in_at","checked_out_at","no_show_at","first_received_at","updated_at","placement"],"properties":{"room_numbers":{"type":"array","description":"The real rooms the hotel gave this reservation (a hotel with no PMS); empty until it does.","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"number":{"type":"string"}}}},"placement":{"description":"Where the PMS put the guest. Null means as the channel booked it. What the channel booked is never overwritten.","oneOf":[{"type":"null"},{"type":"object","required":["room_type_id","arrival","departure","rooms","version","placed_at"],"properties":{"room_type_id":{"type":"string","format":"uuid"},"arrival":{"type":"string","format":"date"},"departure":{"type":"string","format":"date"},"rooms":{"type":"integer"},"version":{"type":"integer","description":"Grows with every change of placement."},"placed_at":{"type":"string","format":"date-time"}}}]},"mirror":{"type":"object","description":"Only in the single-reservation response, and only when the channel keeps its own bookings: how far telling the channel got.","required":["status","blocked_reason","desired_version","sent_version","attempt","last_error","next_attempt_at","sent_at"],"properties":{"status":{"type":"string","enum":["pending","sent","blocked","failed"]},"blocked_reason":{"type":["string","null"],"description":"unmapped_room: the room type is not mapped on this connection."},"desired_version":{"type":"integer"},"sent_version":{"type":"integer"},"attempt":{"type":"integer"},"last_error":{"type":["string","null"]},"next_attempt_at":{"type":["string","null"],"format":"date-time"},"sent_at":{"type":["string","null"],"format":"date-time"}}},"id":{"type":"string","format":"uuid"},"property_id":{"type":"string","format":"uuid"},"connection_id":{"type":["string","null"],"format":"uuid","description":"Null for a reservation the hotel made itself."},"source":{"type":"string","enum":["channel","manual","pms"],"description":"Where the reservation comes from: a channel, made by hand in Antero Connect, or reported by the hotel's own software."},"booked_via":{"type":"string","enum":["staff","engine"],"description":"For a reservation made in Antero Connect: `engine` when the guest booked on the public booking page, `staff` when someone in the hotel did. `staff` for every other source."},"answers":{"type":"array","items":{"type":"object","required":["question","answer"],"properties":{"question":{"type":"string"},"answer":{"type":"string"}}},"description":"For a booking from the booking page: what the guest answered, with each question as it was asked (so a later change of the questions rewrites nothing). Only for a caller with `read:reservations.personal`."},"price_lines":{"type":"array","items":{"$ref":"#/components/schemas/PriceLine"},"description":"For a booking from the booking page with taxes or fees: the lines it was priced with (`total_amount` includes the ones that are added). Absent otherwise."},"notes":{"type":["string","null"],"description":"A private note of the hotel."},"payment_status":{"type":["string","null"],"enum":["unpaid","deposit","paid",null],"description":"Only for a reservation the hotel made itself; null when a channel handles the payment."},"external_id":{"type":"string","description":"The channel's booking number. Unique per connection."},"status":{"type":"string","enum":["pending","confirmed","cancelled"]},"pending_reason":{"type":["string","null"],"enum":["unmapped_room","unmapped_rate","no_price","bad_dates","bad_nights","bad_currency",null]},"room_type_id":{"type":["string","null"],"format":"uuid"},"rate_plan_id":{"type":["string","null"],"format":"uuid"},"arrival":{"type":["string","null"],"format":"date"},"departure":{"type":["string","null"],"format":"date"},"stay_nights":{"type":["integer","null"]},"rooms":{"type":"integer"},"adults":{"type":"integer"},"children":{"type":"integer"},"currency":{"type":["string","null"],"description":"The channel's currency (ISO 4217)."},"total_amount":{"type":["integer","null"],"description":"The total in the smallest unit; null when the channel gave no price."},"nights_derived":{"type":"boolean","description":"The per-night prices were spread evenly from the total","not sent by the channel.":null},"collected_by":{"type":["string","null"],"enum":["hotel","channel",null]},"collected_by_assumed":{"type":"boolean","description":"True when the channel did not say who collects the payment and hotel is only the cautious default: check before charging or not charging the guest."},"booked_at":{"type":["string","null"],"format":"date-time","description":"When the guest booked, in UTC. Null when the channel did not say or gave a time without a zone: it is never guessed."},"cancelled_at":{"type":["string","null"],"format":"date-time"},"checked_in_at":{"type":["string","null"],"format":"date-time","description":"The front desk's record: when the guest arrived. Null until then. It never moves rooms or reaches a channel."},"checked_out_at":{"type":["string","null"],"format":"date-time","description":"When the guest left. Null until then."},"no_show_at":{"type":["string","null"],"format":"date-time","description":"When the guest was marked as not coming. Null otherwise."},"first_received_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"guest":{"type":"object","description":"Guest contact data. Present only with `read:reservations.personal`."},"nights":{"type":"array","description":"Only in the single-reservation response.","items":{"type":"object","required":["date","amount"],"properties":{"date":{"type":"string","format":"date"},"amount":{"type":"integer"}}}},"room_lines":{"type":"array","description":"Only in the single-reservation response.","items":{"type":"object","required":["index","room_type_id","rate_plan_id"],"properties":{"index":{"type":"integer"},"room_type_id":{"type":["string","null"],"format":"uuid"},"rate_plan_id":{"type":["string","null"],"format":"uuid"}}}},"revisions":{"type":"array","description":"Only in the single-reservation response.","items":{"type":"object","required":["seq","kind","external_revision","received_at","applied"],"properties":{"seq":{"type":"integer"},"kind":{"type":"string","enum":["create","modify","cancel"]},"external_revision":{"type":["string","null"]},"received_at":{"type":"string","format":"date-time"},"applied":{"type":"boolean"}}}}}},"AvailabilityExplanation":{"type":"object","required":["room_type_id","date","available","source","holds","held","effective"],"properties":{"room_type_id":{"type":"string","format":"uuid"},"date":{"type":"string","format":"date"},"available":{"type":["integer","null"],"description":"The PMS's number; null if the PMS has not set this day."},"source":{"type":["string","null"]},"holds":{"type":"array","items":{"type":"object","required":["reservation_id","external_id","connection_id","qty","feed_seq"],"properties":{"reservation_id":{"type":"string","format":"uuid"},"external_id":{"type":"string","description":"The booking number: the channel's, or Antero Connect's own (KN-...) for a booking made in Antero Connect."},"connection_id":{"type":["string","null"],"format":"uuid","description":"The channel connection the booking came through; null for a booking made in Antero Connect."},"qty":{"type":"integer"},"feed_seq":{"type":"integer","description":"The property's sequence number that releases it once the PMS has confirmed through it."}}}},"held":{"type":"integer","description":"The sum of the holds."},"effective":{"type":"integer","description":"What Antero Connect sends: available minus held, never below 0."}}}}}}