Use with AI
Connect does not ship official HTTP SDKs. Assistants should read the contract and OpenAPI, then generate a client in your language. A second “docs MCP” is unnecessary.
Two different tools:
| Goal | Use |
|---|---|
| Generate a production client | Contract card + OpenAPI YAML (widget below) |
| Let a chat agent call search/quote/book | Booking MCP (Streamable HTTP) |
Do not use MCP as a codegen source of truth. Do not book production inventory from a Custom GPT Action.
Path to a working integration
Six steps, same wire as production. Copy identifiers literally. Do not invent fields.
- 1
Create a sandbox key
sk_test_* from the Connect console. Never send it as X-API-Key.
- 2
Resolve hotels, then search
Content API for catalog codes. Availability has no destination field — send criteria.hotels.
- 3
Quote first; skip only without RECHECK
Quote by default. Book from search only when no RATE_TYPE remark contains RECHECK and that connection allows it. Handoff search options[].id → quote optionRefId.
- 4
Book and persist bookingID
Book with optionQuote.optionRefId. Read booking.reference.bookingID. Status is BOOK_STATUS_TYPE_*.
- 5
Treat HTTP 200 as maybe-failed
Inspect errors[] (ERR_CODE_* / ERR_TYPE_*). Gateway 401/403/429 is a different envelope.
- 6
Point the IDE at the contract
AGENTS.md + OpenAPI YAML. Optional booking MCP for agents that call the funnel live.
Authenticate once
Buyer header is Authorization with an ApiKey prefix. Sandbox keys only work on the test host.
OpenAPI — generate the client
Stable YAML for OpenAPI Generator, Postman, Insomnia, and IDE plugins. Import the file; do not install unpublished SDK packages.
Build with your assistant
There is no official HTTP SDK. Point Cursor, ChatGPT, or Claude at the contract and OpenAPI, then generate a client in your language.
Cursor
Index the docs and drop AGENTS.md in the buyer repo. Optional: install booking MCP for live search/quote/book.
ChatGPT
Opens a chat preloaded with the contract, OpenAPI URL, auth header, and fields you must not invent.
Claude
Same prompt as ChatGPT. Prefer project knowledge plus OpenAPI over executing book from a custom action in production.
Install booking MCP
Streamable HTTP at the aggregator. Tools: availability, quote, book, bookingDetail, cancel. Same identifiers as REST. Set BUNDLEPORT_API_KEY in the environment; the install snippet uses ${env:BUNDLEPORT_API_KEY}. Do not commit sk_*.
{
"mcpServers": {
"bundleport-hotels": {
"url": "https://api.connect.bundleport.com/mcp",
"headers": {
"Authorization": "ApiKey ${env:BUNDLEPORT_API_KEY}"
}
}
}
}Cursor
- Docs: Settings → Indexing & Docs → add
https://docs.bundleport.com(or@Docsthis site). - Rules: copy AGENTS.md into the buyer repo as
AGENTS.md(or a project rule that says “follow that file”). - Optional booking MCP (runtime only) — use Add to Cursor in the widget above. Put the key in env; do not commit it.
Use sk_test_* until the agent is restricted. MCP tools are availability, quote, book, bookingDetail, cancel.
ChatGPT
- Knowledge / codegen: upload or fetch
llms-full.txtplusopenapi/hotels.yaml. Prefer generating REST code over Actions that execute book in production. - Custom GPT Actions (test only): import
https://docs.bundleport.com/openapi/hotels.yaml, serverhttps://test-api.bundleport.com, auth headerAuthorization: ApiKey sk_test_*. Never attachsk_prod_*.
Claude
- Project knowledge: add
https://docs.bundleport.com/llms.txtand the contract URL. Fetch OpenAPI when writing code. - Claude Code: project instruction =
AGENTS.md. Optional MCP booking endpoint as above.
Gemini
Gem or URL context: https://docs.bundleport.com/llms.txt and https://docs.bundleport.com/openapi/hotels.yaml. Paste the contract card if the context window is tight.
Any language (OpenAPI Generator / curl)
Generate types from the YAML, or call REST directly. Always parse errors[] on HTTP 200. Search occupancies use age only. There is no destination field on availability — resolve hotel codes via the Content API, then send criteria.hotels as in Search.
- JavaScript
- Python
- cURL
const res = await fetch('https://test-api.bundleport.com/connect/hotels/v1/availability', {
method: 'POST',
headers: {
Authorization: `ApiKey ${process.env.BUNDLEPORT_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
criteria: {
checkIn: '2026-11-01T00:00:00Z',
checkOut: '2026-11-03T00:00:00Z',
occupancies: [{ paxes: [{ age: 30 }, { age: 30 }] }],
hotels: ['12345'],
currency: 'EUR',
language: 'en',
},
settings: {
connectionCodes: ['testb-conn-1876'],
timeout: 10000,
},
}),
});
const data = await res.json();
if (!res.ok) throw new Error(`HTTP ${res.status}`);
if (Array.isArray(data.errors) && data.errors.length) {
console.error(data.errors);
}
import os
import httpx
r = httpx.post(
"https://test-api.bundleport.com/connect/hotels/v1/availability",
headers={"Authorization": f"ApiKey {os.environ['BUNDLEPORT_API_KEY']}"},
json={
"criteria": {
"checkIn": "2026-11-01T00:00:00Z",
"checkOut": "2026-11-03T00:00:00Z",
"occupancies": [{"paxes": [{"age": 30}, {"age": 30}]}],
"hotels": ["12345"],
"currency": "EUR",
"language": "en",
},
"settings": {"connectionCodes": ["testb-conn-1876"], "timeout": 10000},
},
timeout=30.0,
)
r.raise_for_status()
data = r.json()
if data.get("errors"):
raise RuntimeError(data["errors"])
curl -sS -X POST https://test-api.bundleport.com/connect/hotels/v1/availability \
-H "Authorization: ApiKey $BUNDLEPORT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"criteria":{"checkIn":"2026-11-01T00:00:00Z","checkOut":"2026-11-03T00:00:00Z","occupancies":[{"paxes":[{"age":30},{"age":30}]}],"hotels":["12345"],"currency":"EUR","language":"en"},"settings":{"connectionCodes":["testb-conn-1876"],"timeout":10000}}'
Quickstart has full occupancy and book examples. HTTP clients — no published SDK packages.