NEXORA B2B API

Developer Portal · v1

Partner dashboard

Base URL: https://webnexora.cloud/api/public/v1

Buraq dashboard training

Open Partner Dashboard → Buraq sandbox for a separate browser-only training form. Enter scenario names, airports, dates, passenger count and a training total; these are not live airline offers. Create a held model, confirm it, change the outbound date, confirm an open return, reverse its direction, choose a sample seat, add a 23 kg bag, simulate separating a passenger or cancelling, and print a clearly marked non-travel document.

Egypt (CAI/ALY/HBE) bag training totals are 270 LYD and Tunis 120 LYD per selected passenger, once across the whole itinerary. Production baggage purchase is described in the baggage section. Change amounts are manually entered training totals, not an airline quote. Seat availability is not verified. Passenger separation only updates the training model and its log; it does not create another airline record.

Training state is temporary and separate from saved bookings: no PNR, ticket number, wallet debit, refund, supplier request, email, WhatsApp or webhook. Leaving the tab discards the model. Production buttons and API-key permissions are unchanged. This does not extend the existing stateless sandbox API into a full mock ticket lifecycle.

The training model follows the same six-hour servicing boundary: change, open-return confirmation and cancellation are locked during the last six hours before the training departure. After a training departure, cancellation waits until midnight (Libya time) at the end of the departure day. Training seat availability and prices remain manually entered scenarios, never live confirmations.

Introduction

Keys: up to 3 active production keys plus 1 sandbox key (nxk_demo_…). Sandbox booking never calls the airline or charges; flight search can read real airline availability.

Currency: airline settlement remains LYD. When NEXORA configures USD pricing for your account, the v1 API returns prices, total, base_fare, taxes, confirmed penalties and refunds in USD. Send accepted_total in the returned currency. Fields ending in _lyd remain LYD audit/settlement amounts, not USD prices. Your balance is settled in LYD; pricing configuration is private.

The NEXORA B2B API distributes NEXORA flight inventory to authorized partners. Each partner only receives the suppliers and services NEXORA assigned to its account; this is enforced on the server for every request.

Buraq Air content is returned with supplier_source = "NEXORA-BURAQ" so your platform can identify it as a separate source and rank it with your own rules. NEXORA never changes your existing suppliers or ranking.

Authentication & credentials

Send your key in the X-API-Key header on every request. Keys are shown once at creation and stored only as a hash; revoke and rotate them from the partner dashboard.

Sandbox keys start with nxk_demo_. Search reads real availability, but booking is simulated and never issues or charges your balance. Production keys start with nxk_ and only work after NEXORA enables production for your account.

If NEXORA configured an IP allowlist, requests from other IPs are rejected with PERMISSION_DENIED (IP_NOT_ALLOWED).

curl -X POST https://webnexora.cloud/api/public/v1/flights/search \
  -H "X-API-Key: nxk_demo_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"origin":"MJI","destination":"BEN","date":"2026-12-01","adults":1}'

Responses, idempotency & rate limits

Every response is JSON with success, environment (sandbox | production) and request_id. Errors add error_code and message.

Send an Idempotency-Key header (8-100 chars) on POST requests you may retry. A repeated key returns the stored response with idempotent_replay = true instead of booking or charging twice.

Default rate limit is 60 requests per minute per key (NEXORA may set a different limit for your account).

{
  "success": false,
  "error_code": "PRICE_CHANGED",
  "message": "The flight price has changed. Please revalidate the booking.",
  "new_price": 412.5,
  "currency": "LYD",
  "request_id": "REQ-9F2A61C04B7D11E2"
}

Flight search, pricing & booking

Workflow: search → price (revalidate) → bookings/create with accepted_total → ticket numbers returned, or status ticketing_in_progress followed by a webhook.

Search returns only the exact airports and dates requested. available_dates contains nearby Buraq dates from the same live response, not offers for your requested date; search again to select them. HBE and ALY are different Alexandria airports; no automatic substitution is performed.

Sandbox bookings currently return simulated=true, status=confirmed, a DEMO- booking_id, pnr=null and ticket_numbers=[]. No mock PNR/ticket lifecycle or GET retrieval of DEMO- bookings is implemented; this is not proof of airline confirmation.

Search prices are indicative (price_status = indicative). Only flights/price and bookings/create return confirmed prices. Buraq Air is sold in LYD; infant bookings on Buraq are not available through the API.

POST
/flights/search
Live

Search flights

One-way or round trip. Only your authorized suppliers are searched. When Buraq Air has no direct seat on a one-way date, connecting offers through a Buraq base are returned with connection=true, connection_airport, layover_minutes and tickets=2: the price is the sum of both flights, booking returns two PNRs (pnrs) with one wallet charge per flight, baggage is re-checked at the connection airport, the extra 23 kg bag is not sold on connections, and status "partial" means only the first flight was issued and charged.

{"origin":"MJI","destination":"IST","date":"2026-12-01","return_date":"2026-12-10","adults":2,"children":1,"infants":0}
{"success":true,"count":12,"currency":"LYD","offers":[{"offer_id":"buraq:UZ0221:Y:2026-12-01:MJI:IST:1:0930","airline":"Buraq Air","supplier_source":"NEXORA-BURAQ","booking_class":"Y","price":1180,"base_fare":1050,"taxes":130,"taxes_included":true,"currency":"LYD","price_status":"indicative","bag_checked":"30 kg","seats_remaining":7,"legs":[...]}]}
POST
/flights/price
Live

Revalidate price

Live price from the airline for the exact passengers. Nothing is booked or charged.

{"offer_id":"buraq:...","passengers":[{"type":"adult","gender":"MALE","first_name":"AHMED","last_name":"ALI","date_of_birth":"1990-05-01","passport_number":"A1234567","issuing_country":"LY","nationality":"LY","expiry_date":"2030-01-01"}],"phone":"+218910000000"}
{"success":true,"price":1195,"currency":"LYD","price_status":"confirmed"}
POST
/bookings/create
Live

Book & issue

Charges your balance (then credit line, if any), books and issues once. A price change returns PRICE_CHANGED with new_price; nothing is charged.

{ ...same as /flights/price..., "accepted_total": 1195 }
{"success":true,"status":"ticketed","booking_id":"K7X2QP","supplier":"Buraq Air","supplier_source":"NEXORA-BURAQ","pnr":"K7X2QP","ticket_numbers":["9012345678901"],"total":1195,"currency":"LYD","charged_lyd":1195}
GET
/flights/seat-map?offer_id=buraq:…
Live

Seat map (Buraq Air)

Live outbound seat map for a Buraq offer: seat, available, price, exit_row. Send the chosen seat as passengers[].seat (e.g. "5A") in flights/price and bookings/create; the seat fee is included in the final total. Other suppliers return NOT_SUPPORTED.

Booking retrieval & PNR

booking_id is the PNR returned by bookings/create. You can only read your own bookings. For Buraq Air the booking reference is the airline PNR.

GET
/bookings/{booking_id}
Live

Get booking

Stored booking with status, passengers, legs, ticket numbers, amounts.

GET
/bookings/{booking_id}/pnr
Live

Live PNR

Reads the PNR from the airline now: segment statuses, ticket numbers and coupon statuses (open, flown, void, refunded, exchanged).

Changes, reversed direction & open returns

The same engine NEXORA staff use. Each call is quote-first: without accepted_total you receive flights or a quote; repeating with accepted_total charges, changes and reissues at the airline, then verifies the new ticket.

If the airline does not confirm, the charge is refunded. If the result is unclear, the booking moves to ticketing_in_progress for NEXORA review; it is never refunded or reissued blindly.

Round-trip date changes are handled manually: you receive status change_pending with an operation_reference.

POST
/bookings/change
Live

Change date / reissue

Fees: airline fare difference + airline change fee (from fare rules) + NEXORA service fee, all shown in the quote. reverse_direction = true flies the same ticket the other way.

{"booking_id":"K7X2QP","date":"2026-12-05","flight_number":"UZ0221","booking_class":"Y","accepted_total":70}
{"success":true,"booking_id":"K7X2QP","status":"reissued","automatic":true,"charged_lyd":70,"ticket_numbers":["9012345678955"]}
POST
/bookings/open-return
Live

Confirm open return

Dates and issues an open return in the same class; only the airline's fare difference is charged.

{"booking_id":"K7X2QP","date":"2027-01-10","flight_number":"UZ0222","accepted_difference":0}

Cancellation & refunds

The cancellation-rules response field is free_void_available (not free_void_allowed). The deadline is returned as an absolute ISO timestamp; eligibility also depends on departure timing and airline acceptance, not midnight alone.

During the last six hours before departure, date changes, open-return confirmation and cancellation requests are rejected with SERVICING_NOT_AVAILABLE before any supplier request, status change or charge. After departure, the existing cancellation rule still requires waiting until six hours after take-off; no refund or penalty is guessed.

Rules come from the airline response. Check cancellation-rules first. Inside the free window the ticket is voided automatically and refunded. Otherwise the request goes to manual review: NEXORA confirms the airline penalty, then you accept or reject it with penalty-response. No penalty or refund amount is guessed.

GET
/bookings/{booking_id}/cancellation-rules
Live

Cancellation rules

cancellation_available | cancellation_restricted, free void deadline, penalty status.

POST
/bookings/cancel
Live

Cancel

Automatic void + refund when the airline accepts it; otherwise status cancellation_pending with operation_reference.

{"booking_id":"K7X2QP"}
POST
/bookings/penalty-response
Manual step

Accept / reject penalty

After NEXORA confirms the penalty (status penalty_confirmed). Accepting moves to refund_pending; NEXORA completes the refund.

{"booking_id":"K7X2QP","accept":true}
GET
/operations/{reference}
Live

Manual operation status

manual_review → in_progress → completed | rejected, with NEXORA's resolution note.

Partner account

Your internal pricing configuration is not exposed.

GET
/partner/profile
Live

Profile

Authorized suppliers and services, environments, rate limit.

GET
/partner/balance
Live

Balance

balance_lyd, credit_limit_lyd, credit_used_lyd, available_lyd.

GET
/partner/transactions?limit=50
Live

Transactions

Wallet movements and credit-line entries.

Webhooks

Set an HTTPS URL at https://webnexora.cloud/partner → Webhooks, not on the legacy API agent page. A signing secret (whsec_...) is shown once in API credentials. One endpoint/secret is shared by the partner account’s sandbox and production keys; separate per-key endpoints are not supported. Events: booking.pending, ticket.issued, booking.reissued, booking.changed, booking.cancelled, refund.pending, refund.completed, operation.updated, webhook.test.

ticketing.failed is not implemented. A 202 ticketing_in_progress initially emits booking.pending and needs operations review; do not assume a guaranteed terminal webhook or automatic refund. Read booking status and contact NEXORA before a new booking attempt.

Webhook data varies by event: booking_id, pnr and status are NOT universal fields. Cancellation/refund events currently carry booking_id and refund_lyd (plus converted refund/currency); ticket.issued carries the booking result. webhook.test has no booking or PNR.

Verify: HMAC-SHA256 of `${X-Nexora-Timestamp}.${raw body}` with your secret equals X-Nexora-Signature (sha256=...). Use X-Nexora-Event-Id to drop duplicates. Failed deliveries retry after 1, 5, 15, 60 and 240 minutes.

POST
/webhooks/test
Live

Send test event

Works with an authorized sandbox or production key after the shared endpoint is configured. Send an empty body or {}. Returns delivered, delivery_status, attempts and response_code. No booking or wallet operation.

// Node.js
const crypto = require("crypto");
const expected = "sha256=" + crypto.createHmac("sha256", SECRET).update(req.headers["x-nexora-timestamp"] + "." + rawBody).digest("hex");
const ok = crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(req.headers["x-nexora-signature"]));

Error codes

AUTHENTICATION_FAILED (401) · PERMISSION_DENIED (403) · INVALID_REQUEST (400) · INSUFFICIENT_BALANCE (402) · NOT_FOUND (404) · FLIGHT_UNAVAILABLE (409) · PRICE_CHANGED (409) · CANCELLATION_NOT_AVAILABLE (409) · SERVICING_NOT_AVAILABLE (409) · RATE_LIMIT_EXCEEDED (429) · NOT_SUPPORTED (501) · BOOKING_FAILED (502) · TICKET_ISSUANCE_FAILED (502) · SUPPLIER_ERROR (502) · SUPPLIER_TIMEOUT (504)

TICKET_ISSUANCE_FAILED alone is not evidence of a debit, cancellation or completed refund. Check your transactions and contact NEXORA with request_id. Replay with the SAME Idempotency-Key to read the first result; never use a new key until the previous outcome has been reconciled.

Accepted-but-pending results use HTTP 202 with success = true and a status such as ticketing_in_progress, cancellation_pending or change_pending.

Booking statuses

ticketed · ticketing_in_progress · change_pending · reissued · cancellation_pending · penalty_confirmed · refund_pending · refunded · cancelled. A held booking is never reported as ticketed, and ticket numbers appear only after issuance.

Buraq Air — partner dashboard walkthrough

Open https://webnexora.cloud/partner and sign in to your NEXORA API partner account. API credentials → New production key creates a live key only for an account approved for production. Copy the key immediately; it is shown once. Do not send the key by email or chat.

Search & book → enter the exact airport codes, departure date, optional dated return, adults and children → Search → select the returned flight/class. Enter every passenger exactly as in their passport and the recipient phone in international format. Choose seat is available for the Buraq outbound flight; availability and fees are rechecked in the final quote.

Revalidate price first. Review the returned final total and currency before confirming payment/issuance. A changed price needs explicit approval. After submission, read the booking result; never repeat an unclear or pending issuance as a new purchase.

Bookings → find your ticketed one-way Buraq booking → Change date → choose the requested date → search → select a returned flight/class → review fare difference and fees → tick the explicit approval → confirm/reissue. The partner screen reuses the exact same NEXORA Buraq date-change control, including the reverse-route option. This screen operates on your saved booking; a quote is not a completed change.

Automatic date changes from this screen are supported for one-way bookings only. Bookings with a return segment (including an open return) are rejected by this date-change screen. Dated round-trip changes via the API create a manual operation_reference; contact NEXORA operations rather than repeatedly trying to issue.

For a ticketed booking with a saved open return: Bookings → Confirm open return → choose the return date → search → select a returned flight in the original return class → review the airline fare difference → tick approval → confirm. This is the same NEXORA Buraq open-return control; the existing server re-quotes before any payment. Additional baggage at initial booking is documented in the baggage section; it is not an open-return servicing action.

Transactions shows wallet activity; API credentials manages keys; Webhooks configures the shared HTTPS endpoint and signing secret; Activity logs lists request IDs; API documentation contains this reference. Account approval, allowed services and access to other users’ bookings are never changed by these controls.

Buraq Air — confirm an existing open return

Prerequisites: a production key and an owner-scoped ticketed booking whose stored return_seg is genuinely open. The API cannot create a new open-return booking using return_date=OPEN; search and bookings/create currently accept dated itineraries only.

Step 1 — POST /bookings/open-return with booking_id and date only. The response step=select_flight supplies the eligible flight_number and its stored booking class. Choose from the actual response; never invent a flight or switch the original return class.

Step 2 — repeat with booking_id, date and the selected flight_number, WITHOUT accepted_difference. The response step=quote returns fare_difference_lyd. When the partner is priced in USD, its converted fare_difference is also provided; this endpoint’s accepted_difference currently must still equal the returned LYD fare_difference_lyd. Do not pass the converted display amount to this endpoint.

Step 3 — obtain explicit customer approval, then repeat with accepted_difference equal to the quoted LYD difference, using a fresh Idempotency-Key for this confirmation step and retaining it for all retries of that same confirmation. A zero confirmed difference is allowed. PRICE_CHANGED with new_difference_lyd requires another review, not blind retry.

Success returns status=reissued, automatic=true, charged_lyd and ticket_numbers, and queues booking.changed. Read GET /bookings/{booking_id} and GET /bookings/{booking_id}/pnr to inspect the saved booking and live coupon evidence. Pending/unclear results need NEXORA review; do not reissue automatically.

Use a distinct Idempotency-Key for each different quote/selection/confirmation request. Reusing the quote’s key for confirmation replays the quote, because the key identifies the first request, not a multi-step session. Sandbox responses are simulation only and do not prove an issued open-return ticket.

// Example bodies only — use your own booking and a flight returned by step 1.
// Step 1: list eligible flights
{"booking_id":"ABC123","date":"2027-01-10"}
// Step 2: quote the chosen flight
{"booking_id":"ABC123","date":"2027-01-10","flight_number":"UZ0222"}
// Step 3: ONLY if the live quote confirms a zero LYD difference
{"booking_id":"ABC123","date":"2027-01-10","flight_number":"UZ0222","accepted_difference":0}

Buraq Air — date-change API details

POST /bookings/change: (1) booking_id + date lists flights; (2) add the returned flight_number and booking_class to get the quote; (3) add accepted_total to confirm after customer approval. Use a separate key for each step and reuse only the confirmation key when retrying the same purchase/change.

The quote contains fare_difference_lyd, airline_fee_lyd, service_fee_lyd and total_lyd. Unlike initial bookings/create (which accepts the returned display currency), this servicing endpoint currently compares accepted_total with quote.total_lyd. Use the LYD total even if converted total is also returned for display; this is an explicit current API limitation.

reverse_direction is supported for eligible one-way API bookings; the shared partner date-change control also includes the existing reverse-route checkbox. Do not use it for a round trip. A dated round trip is sent to operations with HTTP 202 and operation_reference, not automatically reissued.

Bookings with any return segment are not supported by the automatic date-change core. For an open return, use open-return to confirm that return, not change to move the outbound. A successful change returns reissued with actual ticket_numbers and queues booking.reissued; read back the booking/PNR before considering it complete.

Buraq Air — baggage and additional 23 kg bag

Read the selected offer’s bag_checked and bag_cabin rather than treating baggage as a fixed airline-wide promise. Explicit returned fare-rule weight takes precedence; the current fallback is H=40 kg checked, other classes=23 kg checked, plus 7 kg cabin. L is a booking class, not a guarantee of availability on another day.

Additional 23 kg bag at initial booking is available to partners in production for Buraq Air: one bag per selected passenger on Cairo (CAI), Alexandria (ALY), Borg El Arab (HBE) and Tunis (TUN) routes. Dashboard: Search & book → tick Additional bag · 23 kg for the passenger → Get final price → confirm. API: send passengers[].extra_bag=true in both flights/price and bookings/create.

Totals per selected passenger: 270 LYD for CAI/ALY/HBE and 120 LYD for TUN, once for the whole booking including a matching return, never once per direction. The price response includes the bags in the final total and returns extra_bags {count, weight_kg, total_lyd}; send that final total as accepted_total.

Payment rule: the ticket and bags are debited together from the partner balance. If the balance cannot be debited, nothing is held, no ticket is issued and no bag is added (INSUFFICIENT_BALANCE). The airline prices the bag live before payment; if it does not confirm the approved price the request is refused before any debit, and a route without a bag price returns NOT_SUPPORTED.

After booking, extra_bags.status is confirmed once the airline issued the bag. pending_review is not final: do not retry the payment or booking; read the booking and contact NEXORA operations. Adding a bag to an already issued ticket is not available, and bags are not offered for other suppliers.