Mita Residential · Partner APIv1
ESEN
API v1 · REST/JSON · Read-onlyReviewed: Nov 27, 2026
DEVELOPER REFERENCE / REFERENCIA TÉCNICA

Mita Residential Partner API

Public developer reference · v1 (read-only)
Language: English
Reviewed: November 27, 2026
Base URL: https://api.mitaresidential.com
API prefix: /partner/v1

Scope: The Partner API allows approved agencies and technology partners to retrieve their authorized Mita Residential properties, property details, indicative nightly rates, and indicative Hostaway calendar availability. It does not create reservations, hold inventory, charge payments, or guarantee a price. Credential management is internal and is not part of this public API.

Documentation status: Routes, payload structures, validation, scopes, quotas, property presentation and pricing behavior were reviewed against the supplied NestJS implementation. All sample properties, prices and image URLs are illustrative, not live inventory. Exact database-column nullability still requires a Prisma schema review.

1. Overview and API operations

The Mita Residential Partner API v1 is a read-only REST API over HTTPS, returning JSON. All documented routes use HTTP GET, require an active partner API key, and enforce permissions at the credential level and property level.

Operation Method Endpoint Required scope
List authorized properties GET /partner/v1/properties properties:read
Get property details, photos, amenities GET /partner/v1/properties/:id properties:read
Get indicative nightly rates GET /partner/v1/properties/:id/rates rates:read
Get indicative availability GET /partner/v1/availability/:propertyId availability:read

Each key belongs to an agency/agent profile. The API only exposes properties that are active and explicitly assigned to that profile. An unauthorized property ID and a nonexistent property ID both return 404 to prevent inventory disclosure.

Out of scope for v1: search across unauthorized inventory, booking creation/cancellation, checkout, payments, a final binding quote, webhooks, and public API-key administration.

2. Quick start

  1. Obtain a partner API key from your Mita Residential account contact. The administrator assigns the allowed scopes and request quotas.
  2. Store it as a server-side secret (for example, MITA_PARTNER_API_KEY). Never embed it in browser JavaScript or distributed mobile application code.
  3. Request your authorized catalog:
curl --request GET \
  'https://api.mitaresidential.com/partner/v1/properties?page=1&limit=20' \
  --header 'Accept: application/json' \
  --header 'x-partner-api-key: YOUR_API_KEY'

Illustrative 200 OK:

{
  "success": true,
  "data": [
    {
      "id": 4,
      "name": "Example Oceanfront Villa",
      "slug": "example-oceanfront-villa",
      "thumbnailUrl": "https://images.example.com/villa/cover.jpg",
      "city": "Punta Mita",
      "bedroomsNumber": 4,
      "bathroomsNumber": 4,
      "personCapacity": 8
    }
  ],
  "meta": { "page": 1, "limit": 20, "hasMore": false }
}

The id in each catalog record is the ID to use with property details, rates and availability.

3. Authentication and security

Send your key on every request using this HTTP header:

x-partner-api-key: YOUR_API_KEY
  • Always use HTTPS and make requests from a trusted server environment.
  • Do not use Authorization: Bearer ... for this API; JWT credentials belong to Mita Residential's internal administrative endpoints.
  • Do not put the key in URLs, query parameters, publicly accessible repositories, analytics payloads, support screenshots or logs.
  • Credentials may expire, be revoked, or be associated with an inactive account. In these cases, authentication fails.
  • A full API key is provided only once during administrative creation; it is not retrievable from subsequent administrative listing endpoints.
  • If a key is compromised, contact your Mita Residential administrator to issue a replacement and revoke the original.

Missing header — 401 Unauthorized:

{
  "message": "Partner API key requerida.",
  "error": "Unauthorized",
  "statusCode": 401
}

Invalid, expired or revoked credential — 401 Unauthorized:

{
  "message": "Credencial inválida.",
  "error": "Unauthorized",
  "statusCode": 401
}

Important: backend error messages are currently in Spanish even when a consumer uses an English-language interface. Do not parse the message to identify the HTTP status; use response.status.

4. Permissions (scopes)

Each API key carries one or more independent permissions.

Scope Grants access to Does not implicitly grant
properties:read Authorized catalog and property details Rates, availability
rates:read Indicative rates for authorized properties Catalog, availability
availability:read Indicative calendar availability for authorized properties Catalog, rates

The scopes can be changed by an administrator without changing the API key. Scope access does not override property assignment checks.

Missing required permission — 403 Forbidden:

{
  "message": "La credencial no tiene permiso availability:read.",
  "error": "Forbidden",
  "statusCode": 403
}

The error message refers to the missing scope, such as properties:read, rates:read or availability:read.

5. Rate limits and daily quotas

All four endpoints share two request limits per API key. The limits are checked and consumed together using an atomic update in PostgreSQL.

Default values and configurable bounds

Setting Default when a key is created Allowed configuration
requestsPerMinute 30 requests/minute 1–120/minute
requestsPerDay 500 requests/day 1–10,000/day

These are the application's defaults and allowed configuration ranges, not a quota promised to every partner. An individual key may have lower settings, such as 10/minute and 100/day. Confirm the assigned limits with your account contact.

Fixed UTC windows

  • Minute window: resets at the start of the next UTC clock minute, not 60 seconds after an individual request.
  • Daily window: resets at 00:00 UTC, not after a rolling 24-hour period.
  • Shared quota: calls to listing, details, rates and availability all count toward the same key's counters.
  • Consumed requests: a request passing API-key authentication and rate-limit checks counts toward the quota even if the controller later returns 400, 403 or 404.
  • Failed authentication does not consume this partner quota, since it is rejected first.
  • A cache hit for availability still counts as an API request. Server-side caching reduces Hostaway traffic, not the partner HTTP quota.
  • Multiple applications using one key also share its quota.

On exceeding either limit

The request returns HTTP 429 Too Many Requests:

{
  "statusCode": 429,
  "message": "Límite de solicitudes excedido."
}

The response does not identify which limit was reached. The reviewed guard does not add a custom Retry-After header or X-RateLimit-* headers; do not depend on those being present.

Example: on a key with 10/minute and 100/day, the 11th request in the same UTC minute is rejected if no minute reset occurred, and no additional requests pass after 100 daily requests until the next UTC day.

Recommended client behavior: maintain a local request budget, restrict concurrency, cache safe reads where appropriate and avoid retry loops. After a 429, wait conservatively for the next applicable UTC boundary. Because the response does not identify whether the minute or day was exhausted, stop repeated retries if throttling persists; contact your account representative if you need higher quotas.

6. General conventions

Convention Rule
Base URL https://api.mitaresidential.com
Versioned prefix /partner/v1
HTTP method GET only for documented operations
Response format JSON
Auth header x-partner-api-key
Property IDs Positive integer IDs from the authorized catalog
Date format YYYY-MM-DD, e.g. 2027-02-10
Timestamps ISO 8601 UTC, e.g. 2026-11-27T08:17:17.881Z
Check-out Exclusive: check-out day itself is not counted as a booked night

Typical success envelope:

{ "success": true, "data": {} }

The listing additionally includes meta. Rates and availability return indicative results. 200 OK only means the request was handled; for availability, inspect data.status, and for rates inspect data.complete and the warnings.

Validation order: API-key authentication and rate limiting run before the controller checks scopes and request parameters. Thus, malformed authorized requests may consume quota.

Date rules: availability requires 1–90 nights inclusive. The rates calculation requires real calendar dates and checkOut > checkIn but does not enforce a 90-night maximum in the reviewed method. Do not apply the availability cap to the rates API by assumption.

7. GET /properties — List authorized properties

URL: GET https://api.mitaresidential.com/partner/v1/properties
Required scope: properties:read

Lists only active properties assigned to the agent associated with the key. Ordered by id ascending.

Query parameters

Parameter Type Required Default Allowed values
page integer No 1 1–100
limit integer No 20 1–30

Request

curl -G 'https://api.mitaresidential.com/partner/v1/properties' \
  -H 'x-partner-api-key: YOUR_API_KEY' \
  --data-urlencode 'page=1' \
  --data-urlencode 'limit=20'

Response — 200 OK

{
  "success": true,
  "data": [
    {
      "id": 4,
      "name": "Example Oceanfront Villa",
      "slug": "example-oceanfront-villa",
      "thumbnailUrl": "https://images.example.com/villa/cover.jpg",
      "city": "Punta Mita",
      "bedroomsNumber": 4,
      "bathroomsNumber": 4,
      "personCapacity": 8
    }
  ],
  "meta": {
    "page": 1,
    "limit": 20,
    "hasMore": false
  }
}

The examples use fictional property names and image URLs.

Response fields

Field Description
id Partner property ID; use in detail, rates and availability endpoints.
name Property display name.
slug URL-friendly property identifier.
thumbnailUrl Main image URL if configured.
city Property city/locality.
bedroomsNumber, bathroomsNumber Recorded bed/bath counts.
personCapacity Recorded guest capacity.
meta.page, meta.limit Returned pagination values.
meta.hasMore Whether another page is available.

The actual nullability of original database fields requires confirmation against the Prisma schema; consumers should be tolerant of null optional catalog fields.

Pagination

Increment page while meta.hasMore is true. The API does not return total, totalPages or a cursor. The page parameter cannot exceed 100.

Errors: 400 for invalid page/limit, 401 for authentication, 403 without properties:read, 429 for rate limiting.

8. GET /properties/:id — Property details

URL: GET https://api.mitaresidential.com/partner/v1/properties/:id
Required scope: properties:read

Returns a single active, assigned property with normalized presentation information.

Path parameter

Parameter Type Description
id integer Property ID obtained from the catalog.

Request

curl 'https://api.mitaresidential.com/partner/v1/properties/4' \
  -H 'Accept: application/json' \
  -H 'x-partner-api-key: YOUR_API_KEY'

Response — 200 OK

{
  "success": true,
  "data": {
    "id": 4,
    "name": "Example Oceanfront Villa",
    "slug": "example-oceanfront-villa",
    "description": "Oceanfront villa.\nPrivate pool and terrace.",
    "thumbnailUrl": "https://images.example.com/villa/cover.jpg",
    "city": "Punta Mita",
    "bedroomsNumber": 4,
    "bathroomsNumber": 4,
    "personCapacity": 8,
    "images": [
      { "url": "https://images.example.com/villa/cover.jpg", "caption": "Pool 1.1", "sortOrder": 0 },
      { "url": "https://images.example.com/villa/bedroom.jpg", "caption": "Bedroom 1.1", "sortOrder": 2 }
    ],
    "topAmenities": [
      { "key": "private_pool", "label": "Private Pool" },
      { "key": "wifi", "label": "Wifi" }
    ],
    "additionalInfo": [
      { "key": "included_services", "title": "Included Services", "items": ["Daily housekeeping", "Concierge assistance"] }
    ]
  }
}

Sample content is fictional; property/array shapes are confirmed by the supplied implementation.

Fields and normalization

Field API type Meaning
id number Numeric property ID.
name, slug string Display name and slug.
description string Plain text converted from the source HTML; meaningful line breaks are preserved and common HTML entities are decoded.
thumbnailUrl string | null* Main image when present.
city string | null* City/locality.
bedroomsNumber, bathroomsNumber, personCapacity number | null* Inventory attributes.
images PartnerPhoto[] Array of { url: string, caption: string | null, sortOrder: number }.
topAmenities PartnerAmenity[] Array of { key: string, label: string }.
additionalInfo PartnerAdditionalInfo[] Array of { key: string, title: string, items: string[] }.

* Original catalog-field nullability should be checked against Prisma; these are defensive client types.

Photo selection and ordering

  • Only source images marked visible are queried from storage.
  • Duplicate image URLs are removed. The property thumbnail comes first if provided; it can be inserted even if not present in the visible image query.
  • If there are 25 or fewer unique visible images, they are returned ordered by sortOrder (plus a thumbnail when not already present).
  • For a larger collection, selection favors one photo per numbered bedroom and bathroom, then Outdoor Living (target up to five), Living Spaces (up to five), Pool (up to two), Wellness/Fitness (up to two) and Entertainment (up to two). Unclassified images may fill remaining positions.
  • The implementation targets 25 photos, but prioritized images are not hard-truncated after selection. Do not assume images.length <= 25 is a strict guarantee.
  • The final order reflects photo curation, not necessarily a global sort by sortOrder.

Amenities and additional information

  • topAmenities is always an array. The source amenity codes are trimmed, deduplicated and converted into a machine-readable key plus human-readable label; e.g. private_pool becomes Private Pool.
  • additionalInfo is always an array. It groups a field's content into {key,title,items}. Items can originate from HTML <li> tags or newline-separated text. Empty groups are omitted.
  • Keys and categories are open-ended: write clients that tolerate previously unseen amenity codes and additional-information groups.
  • description is normalized plain text, not HTML markup.

Errors: 400 malformed property ID; 401 authentication failure; 403 missing properties:read; 404 missing/inactive/not assigned property; 429 request quota exceeded.

9. GET /properties/:id/rates — Indicative rates

URL: GET https://api.mitaresidential.com/partner/v1/properties/:id/rates
Required scope: rates:read

Returns indicative prices for each night in the requested period using Mita Residential's internal Rate + Season pricing engine. This API does not check calendar availability, guarantee prices or return booking-ready totals.

Parameters

Parameter Location Type Required Rule
id Path integer Yes Active property assigned to the key's agent.
checkIn Query string Yes Actual date in YYYY-MM-DD format.
checkOut Query string Yes Actual YYYY-MM-DD date after check-in.

The rates calculation validates real dates and a positive interval. No explicit 90-night maximum is enforced in the reviewed rates method; the 90-night cap applies to availability only.

Request

curl -G 'https://api.mitaresidential.com/partner/v1/properties/4/rates' \
  -H 'x-partner-api-key: YOUR_API_KEY' \
  --data-urlencode 'checkIn=2027-02-10' \
  --data-urlencode 'checkOut=2027-02-13'

Complete rate example — 200 OK

{
  "success": true,
  "data": {
    "propertyId": 4,
    "checkIn": "2027-02-10",
    "checkOut": "2027-02-13",
    "nights": 3,
    "pricingSource": "RATE_ENGINE",
    "nightlyRates": [
      { "date": "2027-02-10", "price": 1800, "seasonName": "High Season", "requiresReview": false },
      { "date": "2027-02-11", "price": 1800, "seasonName": "High Season", "requiresReview": false },
      { "date": "2027-02-12", "price": 2000, "seasonName": "High Season", "requiresReview": false }
    ],
    "nightlySubtotal": 5600,
    "complete": true,
    "warnings": [],
    "priceType": "INDICATIVE"
  }
}

Incomplete rate example — 200 OK

An unpriced night can result in HTTP 200 with incomplete pricing rather than an HTTP error.

{
  "success": true,
  "data": {
    "propertyId": 4,
    "checkIn": "2027-02-10",
    "checkOut": "2027-02-12",
    "nights": 2,
    "pricingSource": "MANUAL",
    "nightlyRates": [
      { "date": "2027-02-10", "price": 1800, "seasonName": "High Season", "requiresReview": false },
      { "date": "2027-02-11", "price": null, "seasonName": null, "requiresReview": true }
    ],
    "nightlySubtotal": null,
    "complete": false,
    "warnings": ["Hay noches sin una tarifa automática aplicable."],
    "priceType": "INDICATIVE"
  }
}

All amounts and season names are fictional. The warning text in this example is an actual message the pricing engine may produce.

Field reference

Field Type Meaning
propertyId number Property ID.
checkIn, checkOut string Requested period.
nights number Number of nights, excluding check-out date.
pricingSource "RATE_ENGINE" | "MANUAL" RATE_ENGINE when automatic rates cover every night; MANUAL when automatic pricing is incomplete. MANUAL does not mean this endpoint supplied manually priced rates.
nightlyRates PartnerNightlyRate[] One element per night.
nightlyRates[].date string Night date.
nightlyRates[].price number | null Selected nightly rate, or null if none qualifies.
nightlyRates[].seasonName string | null Name of the selected rate's season, if any.
nightlyRates[].requiresReview boolean true when the night lacks an automatically selected rate.
nightlySubtotal number | null Sum of nightly prices, rounded to two decimals, only when complete=true. Otherwise null.
complete boolean True when all nights received automatic prices; not an availability or reservation guarantee.
warnings string[] Business-rule warnings; may be nonempty even if complete=true.
priceType "INDICATIVE" Non-binding price classification.

Confirmed pricing rules

  • Only active rates linked to active seasons that cover a given night are considered.
  • Rates marked inquireOnly, rates with special rules, and rates whose season minNights exceeds the requested stay are not automatically applied.
  • Eligible rates must be positive finite numbers. If multiple eligible rates exist for one night, the reviewed engine selects the highest price, breaking ties by ascending rate ID.
  • requiresReview=true indicates no automatic rate was selected for that night. Separate warnings can exist even if a rate was selected.
  • nightlySubtotal includes nightly prices only. It does not include tax, service charges, discounts, access fees or a final booking total.
  • The response has no currency field. Do not assume USD or any other currency based on the numeric values. Confirm the commercial display currency with Mita Residential before public price display.

Warnings returned by the backend

These are currently Spanish strings, including for English-speaking integrators:

Exact warnings[] message Meaning
Existen tarifas con reglas especiales sin evaluar. Some special rules were not automatically evaluated.
Existen tarifas bajo consulta. One or more rates require an inquiry/confirmation.
Algunas tarifas requieren más noches de estancia. Some rates require a longer minimum stay.
Hay noches sin una tarifa automática aplicable. At least one night has no eligible automatic rate.

The API does not currently return structured warning codes. Localize these messages in your application if needed; do not assume the exact Spanish text is a stable machine-readable identifier.

Errors

  • 400 missing or incorrectly formatted dates: checkIn y checkOut deben tener formato YYYY-MM-DD.
  • 400 impossible date: Fecha inválida.
  • 400 check-out not after check-in: checkOut debe ser posterior a checkIn.
  • 401, 403, 404, 429 for authentication, missing permission, property access, or request quota.

Always inspect complete, nightlySubtotal and warnings even if HTTP is 200.

10. GET /availability/:propertyId — Indicative availability

URL: GET https://api.mitaresidential.com/partner/v1/availability/:propertyId
Required scope: availability:read

Checks the Hostaway calendar for each night from check-in inclusive to check-out exclusive. This is an indicative, cached availability lookup, not a booking confirmation or inventory hold.

Parameters

Parameter Location Type Required Rule
propertyId Path integer Yes Authorized active property ID.
checkIn Query string Yes Real date in YYYY-MM-DD.
checkOut Query string Yes Real date in YYYY-MM-DD after checkIn.

Allowed length: 1–90 nights inclusive. The check-out date itself is not evaluated as an occupied night.

Request

curl -G 'https://api.mitaresidential.com/partner/v1/availability/4' \
  -H 'x-partner-api-key: YOUR_API_KEY' \
  --data-urlencode 'checkIn=2026-12-10' \
  --data-urlencode 'checkOut=2026-12-15'

AVAILABLE response — 200 OK

{
  "success": true,
  "data": {
    "propertyId": 4,
    "checkIn": "2026-12-10",
    "checkOut": "2026-12-15",
    "nights": 5,
    "availabilityType": "INDICATIVE",
    "status": "AVAILABLE",
    "checkedAt": "2026-11-27T08:17:17.881Z",
    "cacheExpiresAt": "2026-11-27T08:47:17.881Z"
  }
}

UNAVAILABLE response — 200 OK

{
  "success": true,
  "data": {
    "propertyId": 4,
    "checkIn": "2026-12-31",
    "checkOut": "2027-01-15",
    "nights": 15,
    "availabilityType": "INDICATIVE",
    "status": "UNAVAILABLE",
    "checkedAt": "2026-11-27T08:18:25.525Z",
    "cacheExpiresAt": "2026-11-27T08:48:25.525Z"
  }
}

UNVERIFIED response — 200 OK

{
  "success": true,
  "data": {
    "propertyId": 4,
    "checkIn": "2027-02-10",
    "checkOut": "2027-02-15",
    "nights": 5,
    "availabilityType": "INDICATIVE",
    "status": "UNVERIFIED",
    "checkedAt": null,
    "cacheExpiresAt": null
  }
}

UNVERIFIED can also occur with non-null timestamps if the calendar was fetched but contained missing or uninterpretable nights. Timestamp nullability must not be used as an availability status indicator.

Status interpretation

Status Meaning Recommended display/action
AVAILABLE Every requested night was reported as available in the fetched calendar. “Indicatively available”; do not allow instant booking based solely on this response.
UNAVAILABLE At least one night is explicitly blocked/reserved/booked/unavailable. Ask for alternative dates; do not promise availability.
UNVERIFIED The API could not reliably classify every night. “Availability requires confirmation”; never treat this as AVAILABLE.

Server-side decision rules

  1. Validate the dates and 1–90-night stay range.
  2. Verify that the property is active and assigned to the agent before consulting Hostaway.
  3. If a Hostaway listing ID is missing or calendar synchronization is disabled, return UNVERIFIED.
  4. Fetch or reuse the calendar data.
  5. If any night has an explicit blocked, reserved, booked, or unavailable state, return UNAVAILABLE.
  6. If all nights are marked available, return AVAILABLE.
  7. If dates are missing or a state cannot be interpreted, return UNVERIFIED unless a known blocked night was already found.
  8. If Hostaway fails, return 200 OK with UNVERIFIED, never default to AVAILABLE.

Freshness fields

Field Description
availabilityType Always INDICATIVE in v1.
checkedAt UTC time when the calendar data used for the response was obtained. May be earlier than the current request.
cacheExpiresAt UTC expiry of that cached calendar entry on the processing application instance.

Important: cacheExpiresAt is not a promise that the property will remain available until that time. Calendar availability may change after checkedAt.

Validation errors

Invalid format — 400:

{ "message": "Las fechas deben tener formato YYYY-MM-DD.", "error": "Bad Request", "statusCode": 400 }

Nonexistent calendar date — 400:

{ "message": "Fecha inválida.", "error": "Bad Request", "statusCode": 400 }

Check-out not later, zero nights, or over 90 nights — 400:

{ "message": "La estancia debe tener entre 1 y 90 noches.", "error": "Bad Request", "statusCode": 400 }

Property missing/inactive/not assigned — 404:

{ "message": "Propiedad no encontrada.", "error": "Not Found", "statusCode": 404 }

Other errors: 401 invalid credential, 403 missing availability:read, 429 exhausted request quota.

11. Errors and status codes

HTTP status reference

HTTP Meaning Typical cause Integrator action
200 Request handled May contain incomplete rates or UNVERIFIED availability. Read data.complete or data.status.
400 Invalid input Dates, property ID, range, pagination. Correct the request; do not blindly retry.
401 Authentication failure Key missing, malformed, expired, revoked or disabled. Check your key with your administrator.
403 Missing scope Credential does not have operation permission. Request the required scope.
404 Property not accessible Does not exist, inactive or not assigned. Check against authorized catalog.
429 Throttled Per-minute or per-day quota exceeded. Back off; follow UTC windows.
5xx Unexpected backend error Server failure not converted into an indicative response. Log context without secrets; retry sparingly.

NestJS errors usually follow:

{
  "message": "Descripción del problema",
  "error": "Bad Request",
  "statusCode": 400
}

The 429 guard instead produces a body without error:

{ "statusCode": 429, "message": "Límite de solicitudes excedido." }

Never use an error message's language or the optional error field to determine the HTTP status. Use the actual HTTP response status and the response payload's documented business fields.

Endpoint-specific validation

Endpoint Main validation
GET /properties page 1–100 and limit 1–30 (integers).
GET /properties/:id Numeric ID; assigned, active property.
GET /properties/:id/rates Valid date strings, real dates, checkout later than checkin; missing auto-rates yield null/complete=false with 200.
GET /availability/:propertyId Valid dates; stay length 1–90 nights.

12. Caching and data freshness

Availability

  • Server-side, in-memory 30-minute cache per NestJS process.
  • Cache key is the Hostaway listing ID plus checkIn and checkOut.
  • Identical concurrent lookups on the same process share the same Hostaway request.
  • Cache targets a bounded size near 500 entries; this is an internal optimization, not an externally guaranteed entry count or API quota.
  • Different Railway application instances do not share this cache; two requests may have different timestamps despite identical parameters.
  • Hostaway request failures return UNVERIFIED; the implementation does not persist the failed response as an “available” calendar cache entry.
  • A server-side cache hit still consumes one of your partner HTTP requests.

Rates

Rates reuse the internal pricing engine over stored rate/season data. The reviewed Partner rates endpoint does not define a 30-minute Hostaway cache, and no guaranteed public response TTL is established here. Do not assume availability and rates share freshness rules.

Property catalog

The reviewed listing/detail services query PostgreSQL. There is no guaranteed public Cache-Control or catalog response TTL in the supplied endpoint code.

Integration guidance

Always present availability as indicative. Show or use checkedAt to communicate data age, but never interpret a cached result as a reservation hold. Rates and availability are independent requests, potentially observed at different times; they do not form an atomic quote.

13. Integration examples

13.1 Node.js / TypeScript (native fetch, server-side only)

const BASE = 'https://api.mitaresidential.com/partner/v1';
const KEY = process.env.MITA_PARTNER_API_KEY;
if (!KEY) throw new Error('MITA_PARTNER_API_KEY is missing');

async function partnerGet<T>(path: string): Promise<T> {
  const response = await fetch(`${BASE}${path}`, {
    method: 'GET',
    headers: {
      Accept: 'application/json',
      'x-partner-api-key': KEY!,
    },
    cache: 'no-store',
    signal: AbortSignal.timeout(15_000),
  });

  const body: unknown = await response.json();
  if (!response.ok) {
    throw new Error(`Partner API HTTP ${response.status}: ${JSON.stringify(body)}`);
  }
  return body as T;
}

const page = await partnerGet<{
  success: true;
  data: Array<{ id: number; name: string }>;
  meta: { page: number; limit: number; hasMore: boolean };
}>('/properties?page=1&limit=20');

const id = page.data[0]?.id;
if (id !== undefined) {
  const dates = '?checkIn=2027-02-10&checkOut=2027-02-15';
  const rates = await partnerGet<{ success: true; data: PartnerRates }>(
    `/properties/${id}/rates${dates}`,
  );
  const availability = await partnerGet<{
    success: true;
    data: PartnerAvailability;
  }>(`/availability/${id}${dates}`);

  if (!rates.data.complete || availability.data.status !== 'AVAILABLE') {
    // Do not present this stay as ready to book.
  }
}

PartnerRates and PartnerAvailability are defined in the TypeScript contracts section below. This example requires Node.js versions with fetch and AbortSignal.timeout support and assumes the relevant scopes are granted.

13.2 Python (requests)

import os
import requests

BASE = 'https://api.mitaresidential.com/partner/v1'
KEY = os.environ['MITA_PARTNER_API_KEY']

session = requests.Session()
session.headers.update({
    'Accept': 'application/json',
    'x-partner-api-key': KEY,
})

response = session.get(
    f'{BASE}/availability/4',
    params={'checkIn': '2027-02-10', 'checkOut': '2027-02-15'},
    timeout=15,
)
response.raise_for_status()
status = response.json()['data']['status']

if status == 'AVAILABLE':
    print('Indicatively available — not a confirmed booking')
elif status == 'UNAVAILABLE':
    print('Unavailable for at least one night')
else:
    print('Availability requires confirmation')

13.3 Postman setup

  1. Set baseUrl = https://api.mitaresidential.com.
  2. Store partnerApiKey as a secret/local environment variable.
  3. Include x-partner-api-key: {{partnerApiKey}} on every request.
  4. Provide checkIn and checkOut as query parameters; never place the API key in a URL.
  5. Check both the HTTP status and the appropriate business result (data.status or data.complete).
Your server
  |
  |-- GET /properties?page=1&limit=20  [properties:read]
  |     -> authorized catalog
  |
  |-- GET /properties/4               [properties:read]
  |     -> presentation details and selected photos
  |
  |-- GET /properties/4/rates?...     [rates:read]
  |     -> indicative nightly prices + warnings
  |
  '-- GET /availability/4?...         [availability:read]
        -> AVAILABLE / UNAVAILABLE / UNVERIFIED

Your UI -> Informational display only; do not claim a booking exists

13.5 Handling 429 responsibly

async function fetchWithBoundedRetries(
  makeRequest: () => Promise<Response>,
): Promise<Response> {
  const delaysMs = [2_000, 5_000, 15_000];

  for (let i = 0; i <= delaysMs.length; i++) {
    const response = await makeRequest();
    if (response.status !== 429 || i === delaysMs.length) return response;
    await new Promise(resolve => setTimeout(resolve, delaysMs[i]));
  }
  throw new Error('Unreachable');
}

Caution: this is a bounded retry illustration, not a complete quota policy. Immediate retries are ineffective if the daily quota is exhausted. A production integration should maintain quota counters, cap concurrency and avoid repeated jobs while throttled.

14. Production best practices

  1. Keep keys on the server. Next.js Server Components and Route Handlers may call the Partner API securely; Client Components must not contain the secret.
  2. Use least privilege. Request only the scopes actually required.
  3. Plan for shared quotas. A single key's daily and minute budgets are shared across all four endpoints.
  4. Cache responsibly in your own backend. Minimize repeated catalog reads and avoid unnecessary date-specific availability checks.
  5. Set timeouts and limit concurrency. Do not overwhelm your own services or consume all available quota in bursts.
  6. Use HTTP status for protocol errors. Handle 429 even though it lacks an error field.
  7. Handle property 404 neutrally. Do not expose information about another partner's property assignments.
  8. Do not make binding price claims. nightlySubtotal is not a checkout total; currency is not included.
  9. Handle uncertainty explicitly. Show UNVERIFIED and requiresReview clearly, and don't suppress warnings.
  10. Treat rates and availability as separate observations. A returned price does not prove dates are open, and availability does not validate pricing.
  11. Log safely. Capture endpoint, status, latency and timestamps, never full API keys.
  12. Use versioned routes. Do not depend on internal Mita Residential administrative endpoints.

15. Frequently asked questions

Can I call this API directly from a browser or mobile application?
No. The API key is a secret. Route requests through a server, such as a Node.js backend or a Next.js server-only handler.

Do all partners see the same properties?
No. Only properties assigned to the specific agent profile and marked active are returned.

Can scope changes happen without a new key?
Yes. Internal credential management can change scopes and quota limits while retaining the same key.

Does AVAILABLE mean the stay is confirmed?
No. It only means all requested nights were marked available in the calendar result. Availability is indicative and may become stale.

What should I do with UNVERIFIED?
Show “Availability requires confirmation.” Never treat UNVERIFIED as available or allow booking confirmation based on it.

What does pricingSource: "MANUAL" mean?
Some nights lacked automatically selected pricing. It does not mean the API supplied a manually approved price.

Can complete=true still have warnings?
Yes. Warnings may describe inquiry-only rates, special rules or stay restrictions even if another eligible automatic rate exists for every night.

Does the rates endpoint return taxes, fees, currency or a grand total?
No. It returns the per-night amounts and, when complete, their subtotal only. Confirm display currency separately.

Does a rejected 403 or 404 request count against quota?
Yes, if authentication and quota checks succeeded first.

When does the quota reset?
At the next UTC calendar minute and next UTC calendar day, respectively, not on rolling windows.

Can I read how many requests remain?
The reviewed public API provides no dedicated quota-status endpoint, and the guard does not set custom remaining-quota headers.

Can I create bookings, modify credentials or revoke my key through this API?
No. The public Partner API v1 is read-only. Internal administration and reservation workflows are separate.

16. TypeScript contracts

These interfaces document observed response shapes, not an auto-generated OpenAPI or Prisma schema. Verify the exact nullability of original catalog fields when the Prisma schema becomes available.

export type PartnerScope =
  | 'properties:read'
  | 'rates:read'
  | 'availability:read';

export type AvailabilityStatus =
  | 'AVAILABLE'
  | 'UNAVAILABLE'
  | 'UNVERIFIED';

export type PricingSource = 'RATE_ENGINE' | 'MANUAL';

export interface PartnerResponse<T> {
  success: true;
  data: T;
}

export interface PartnerPropertySummary {
  id: number;
  name: string;
  slug: string;
  thumbnailUrl: string | null;
  city: string | null;
  bedroomsNumber: number | null;
  bathroomsNumber: number | null;
  personCapacity: number | null;
}

export interface PartnerPropertiesPage
  extends PartnerResponse<PartnerPropertySummary[]> {
  meta: { page: number; limit: number; hasMore: boolean };
}

export interface PartnerPhoto {
  url: string;
  caption: string | null;
  sortOrder: number;
}
export interface PartnerAmenity { key: string; label: string }
export interface PartnerAdditionalInfo {
  key: string;
  title: string;
  items: string[];
}
export interface PartnerPropertyDetail extends PartnerPropertySummary {
  description: string;
  images: PartnerPhoto[];
  topAmenities: PartnerAmenity[];
  additionalInfo: PartnerAdditionalInfo[];
}

export interface PartnerNightlyRate {
  date: string;
  price: number | null;
  seasonName: string | null;
  requiresReview: boolean;
}
export interface PartnerRates {
  propertyId: number;
  checkIn: string;
  checkOut: string;
  nights: number;
  pricingSource: PricingSource;
  nightlyRates: PartnerNightlyRate[];
  nightlySubtotal: number | null;
  complete: boolean;
  warnings: string[];
  priceType: 'INDICATIVE';
}
export interface PartnerAvailability {
  propertyId: number;
  checkIn: string;
  checkOut: string;
  nights: number;
  availabilityType: 'INDICATIVE';
  status: AvailabilityStatus;
  checkedAt: string | null;
  cacheExpiresAt: string | null;
}

17. Verification and publication checklist

Verified from the reviewed source files

  • Four public GET endpoints with the documented routes, scopes and agent-level property authorization.
  • Required x-partner-api-key header; independent minute/day quotas in fixed UTC windows.
  • Default quotas 30/minute and 500/day; configurable range 1–120/minute and 1–10,000/day.
  • Paginated authorized listing with page 1–100, limit 1–30 and hasMore.
  • Detail response arrays: images with {url,caption,sortOrder}, topAmenities with {key,label} and additionalInfo with {key,title,items}.
  • Plain-text property descriptions; preferred photo selection, source deduplication and gallery category logic.
  • Rates semantics (RATE_ENGINE / MANUAL, nullable nightly prices/subtotal, warnings, complete, INDICATIVE).
  • Availability semantics (AVAILABLE / UNAVAILABLE / UNVERIFIED), 1–90 nights, 30-minute in-process cache.
  • Manual Postman testing of authentication, permissions, property access, throttling, expiration, date validation and repeated cached responses.
  • [ ] Check the Prisma schema for exact nullability of original catalog fields.
  • [ ] Confirm the commercial currency and third-party price-display rules.
  • [ ] Test Hostaway failure/incomplete-calendar behavior resulting in UNVERIFIED in a controlled environment.
  • [ ] Confirm production NestJS/Cloudflare global behaviors: prefixes, CORS, additional HTTP headers and exception handling.
  • [ ] Establish official support contact, change policy, image redistribution terms and applicable SLA.

Mita Residential Partner API · v1 · External developer reference
The internal credential administration contract is maintained separately and is not part of this public guide.

Reviewed technical reference · Commercial and deployment checks remain before official publication.