Integrate your backend with Airhux using a Partner API key. Below: how flight shopping compares to common aggregators, then a concrete search → offer → selection flow against this API.
These names are different layers: some sell raw supplier connectivity, others wrap many carriers behind one API. Airhux is a multi-tenant travel platform: you integrate as a tenant, apply your commercial rules (markup), and call our HTTP API. In this product, flight shopping is backed by Amadeus flight offers (industry-standard JSON offer objects). Partner routes under /v1/partner cover server-to-server steps (e.g. holding a priced offer as a selection); search uses a separate public route so browsers and backends can load results the same way our web apps do.
| Product | Role |
|---|---|
| Amadeus (direct) | You integrate the supplier's own APIs; you manage credentials, offer lifecycle, and contracts with Amadeus. |
| Duffel | Third-party unified REST: offers, orders, ancillaries — one integration style across many carriers (Duffel as integration layer). |
| PKFare | B2B aggregatorstyle APIs: search and book across suppliers — similar "search → offer → order" mental model, different vendor. |
| Airhux | Your tenant is isolated on the platform. Use GET /v1/flights/search for Amadeus-shaped offers (with optional retail markup when tenantId is set), then POST /v1/partner/flights/selections with your Partner API key to persist a chosen offer for checkout or downstream booking flows. |
GET https://patner.gomyticket.com/v1/flights/search. Returns a JSON array of flight offers (Amadeus-style objects: itineraries, segments, price, travelerPricings, etc.). No Partner API key on this route; pass your tenantId so tenant markup rules apply to displayed totals.id (offer id) from the chosen array element. Prefer keeping the full offer JSON in memory for the next step.POST https://patner.gomyticket.com/v1/partner/flights/selections with Authorization: Bearer keyId:secret. Send offerData with the full offer object when possible — that avoids a second supplier search and fixes issues where offer ids can shift between searches.GET https://patner.gomyticket.com/v1/partner/flights/selections/:id returns the stored priced offer and metadata (subject to server TTL).Full booking (passengers, payment, ticketing) is handled by the same platform flows as our apps (wallet, payments, etc.). The Partner API surface today focuses on health, selections, and webhooksfor events — not a duplicate "Duffel order" endpoint on /v1/partner.
GET /v1/flights/searchPublic route (optional user JWT). Use query parameters below. IATA airport codes, ISO dates YYYY-MM-DD.
| Query | Notes |
|---|---|
| origin, destination | Required IATA codes (e.g. MAD, BOS). |
| departureDate | Required outbound date. Alias: date. |
| returnDate | Optional — omit for one-way. |
| adults | Default 1 (max 9). |
| children, infants, infantsSeat | Children 2–12; lap infants; seated infants count toward children for the supplier. |
| travelClass | ECONOMY | PREMIUM_ECONOMY | BUSINESS | FIRST |
| tenantId | Your tenant UUID — required for applying tenant retail markup to offer prices (same tenant as the Partner API key). |
| channel | B2C (default) or AGENT for agent markup channel when applicable. |
Response: JSON array of offers. When tenantId is present, price.total / grandTotal reflect selling price after markup; original supplier total may appear as supplierTotal.
curl -sS \
"https://patner.gomyticket.com/v1/flights/search?origin=MAD&destination=BOS&departureDate=2026-06-15&adults=1&tenantId=<your-tenant-uuid>&channel=B2C"POST /v1/partner/flights/selectionsBody (JSON). If offerData is omitted, the server looks up the offer again using offerId and the same search dimensions — that can fail if ids moved, so always send offerData in production when you have it.
| Field | Notes |
|---|---|
| offerId | String id from the search result item. |
| offerData | Optional — full offer object from search (strongly recommended). |
| origin, destination, departureDate | Must match the search used to obtain the offer. |
| returnDate | If round-trip. |
| adults | Passenger count (default 1). |
| children, infants, infantsSeat, travelClass | Same meaning as search — include when they apply so the server can resolve the offer if offerData is not sent. |
Success: { "selectionId": "<uuid>" }. Send X-Idempotency-Key on POST to safely retry.
curl -sS -X POST "https://patner.gomyticket.com/v1/partner/flights/selections" \
-H "Authorization: Bearer <keyId>:<secret>" \
-H "Content-Type: application/json" \
-H "X-Idempotency-Key: 550e8400-e29b-41d4-a716-446655440000" \
-d '{
"offerId": "1",
"offerData": { /* paste full offer from GET /v1/flights/search response */ },
"origin": "MAD",
"destination": "BOS",
"departureDate": "2026-06-15",
"adults": 1
}'GET /v1/partner/flights/selections/:idReturns a JSON object with selectionId, offerId, pricedOffer (the stored offer), and search dimensions. Selections expire after a server-defined TTL; if missing, repeat search + create selection.
Use on /v1/partner/… only:
Authorization: Bearer <keyId>:<secret>
Content-Type: application/json
# Mutations (e.g. create selection):
X-Idempotency-Key: <uuid>
Idempotency-Key: <uuid>API root for this build: https://patner.gomyticket.com/v1/partner
| Method | Path | Purpose |
|---|---|---|
| GET | /v1/partner/health | Verify the key and return resolved tenant id. |
| POST | /v1/partner/flights/selections | Create a selection from a flight offer. |
| GET | /v1/partner/flights/selections/:id | Retrieve a selection by id. |
Scopes on the key typically include flights:selections and flights:book.
POST https://patner.gomyticket.com/v1/tenants/{tenantId}/partner-api/rotate — path tenant id must match your JWT. Returns a new keyId:secret once.Partner API keys are only for /v1/partner/…. To receive booking and wallet events on your server, configure webhooks in the tenant portal (JWT — not the Partner key) — after sign-in, open Webhooks in the sidebar, or go to /tenants/<tenantId>/webhook-settings.
This page: /partner-api · Tenant portal entry