# Bundleport Connect — agent instructions

Fetch https://docs.bundleport.com/ai/contract and https://docs.bundleport.com/openapi/hotels.yaml before writing a client. Do not invent JSON fields.

## Auth and hosts

- `Authorization: ApiKey sk_test_*` or `sk_prod_*`. No `hotels:*` OAuth scopes.
- Test: `https://test-api.bundleport.com` + `sk_test_*`.
- Production: `https://api.bundleport.com` + `sk_prod_*`.

## Handoff

Search `options[].id` → quote `criteria.optionRefId` → book `input.optionRefId` from `optionQuote.optionRefId` → persist `booking.reference.bookingID` and cancel `cancelReference`. No `bookingReference`.

## Errors

Hotels transactional: HTTP 200 + `errors[]` (`ERR_CODE_*` / `ERR_TYPE_*`). Gateway 401/403/429/5xx is not that envelope. Search/SSE saturated: HTTP 503 `RESOURCE_EXHAUSTED` (availability only). Content uses HTTP 400/404/500. Hotels booking has no HTTP 404. No `PRICE_CHANGED`, `NO_AVAILABILITY`, `CONFIRMED`, or `error_category` on Hotels JSON. Hints (`recommended_action`) match top-level `description` only.

## Status strings

Quote: `STATUS_TYPE_OK` | `STATUS_TYPE_RQ`. Book: `BOOK_STATUS_TYPE_OK`, `BOOK_STATUS_TYPE_KO`, `BOOK_STATUS_TYPE_ON_REQUEST`, `BOOK_STATUS_TYPE_CANCELLED`, `BOOK_STATUS_TYPE_UNKNOWN`, `BOOK_STATUS_TYPE_PENDING_COMMIT`. No `BOOK_STATUS_TYPE_RQ`. Never `PENDING` / `CONFIRMED`. Book response is `BookingDetail` (`reference`, `price`, `rooms[]`, …) — not `hotel` / `holder` / `stay`.

## Timeouts

`settings.timeout` is milliseconds. Search default 10s. Book floor 90s. Cancel floor 60s.

## Codegen vs runtime MCP

- Codegen: OpenAPI at https://docs.bundleport.com/openapi/hotels.yaml and https://docs.bundleport.com/openapi/content.yaml
- Runtime booking agent: Streamable HTTP MCP `https://api.connect.bundleport.com/mcp` tools `availability`, `quote`, `book`, `bookingDetail`, `cancel`. Same identifiers as REST.

There is no official HTTP SDK. Do not `npm install @bundleport/connect-hotels-sdk`. Buyer booking webhooks are not available.

Index: https://docs.bundleport.com/llms.txt
