curl --request POST \
--url https://api.example.com/v1/flight_refund_preview \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"booking_ref": "JNK-A0AUR2",
"last_name": "Carrard"
}
'import requests
url = "https://api.example.com/v1/flight_refund_preview"
payload = {
"booking_ref": "JNK-A0AUR2",
"last_name": "Carrard"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({booking_ref: 'JNK-A0AUR2', last_name: 'Carrard'})
};
fetch('https://api.example.com/v1/flight_refund_preview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/flight_refund_preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'booking_ref' => 'JNK-A0AUR2',
'last_name' => 'Carrard'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/flight_refund_preview"
payload := strings.NewReader("{\n \"booking_ref\": \"JNK-A0AUR2\",\n \"last_name\": \"Carrard\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/v1/flight_refund_preview")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"booking_ref\": \"JNK-A0AUR2\",\n \"last_name\": \"Carrard\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/flight_refund_preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"booking_ref\": \"JNK-A0AUR2\",\n \"last_name\": \"Carrard\"\n}"
response = http.request(request)
puts response.read_body{
"quote": "svq_01J7ZR3M8FKX2P9C",
"state": "completed",
"commitable": true,
"support_level": "AUTO",
"manual_reason": "fare rules require agent review",
"operation_kind": "cancel",
"settlement_basis": "sell_minus_penalty",
"expires_at": "2026-09-03T12:15:00Z",
"item": "itm_7f2c9a4e8b1d",
"provider": "sabre-rest",
"refund": {
"value": 41250,
"amount": 123,
"currency": "USD",
"decimal_places": 2,
"basis": "sell_minus_penalty"
},
"penalty": {
"value": 41250,
"amount": 123,
"currency": "USD",
"decimal_places": 2,
"fee_known": true
},
"documents": [
{
"number": "0012345678901",
"type": "TKT",
"state": "ACTIVE",
"recoverable": false
}
],
"ancillary_recoverable": true,
"provider_figures": {
"refund_net": {
"amount": 123,
"value": 41250,
"currency": "USD",
"decimal_places": 2
},
"penalty_net": {
"amount": 123,
"value": 41250,
"currency": "USD",
"decimal_places": 2
},
"currency": "USD",
"total_paid_net": {
"value": 41250,
"amount": 123,
"currency": "USD",
"decimal_places": 2
}
},
"not_commitable_reason": "not_cancellable"
}{
"error": {
"code": "BAD_REQUEST",
"message": "Malformed JSON in request body.",
"doc_url": "https://docs.gojinko.com/concepts/errors"
}
}{
"error": {
"code": "AUTH_REQUIRED",
"message": "Invalid or expired API key.",
"doc_url": "https://docs.gojinko.com/api-reference/authentication"
}
}{
"error": {
"code": "PAYMENT_REQUIRED",
"message": "Insufficient balance — this call costs $0.0150 and your organization has $0.0000 available. Top up at https://dashboard.gojinko.com/developers/billing/topup",
"doc_url": "https://docs.gojinko.com/concepts/errors"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "booking not found"
}
}{
"error": {
"code": "CONFLICT",
"message": "an exchange is already in progress for this booking",
"doc_url": "https://docs.gojinko.com/concepts/errors"
}
}{
"error": {
"code": "GONE",
"message": "The resource no longer exists.",
"doc_url": "https://docs.gojinko.com/concepts/errors"
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "origins: origins is required; trip_type: trip_type is required",
"doc_url": "https://docs.gojinko.com/concepts/errors"
}
}{
"error": {
"code": "RATE_LIMITED",
"message": "Rate limit or quota exceeded.",
"doc_url": "https://docs.gojinko.com/concepts/errors"
}
}{
"error": {
"code": "UPSTREAM_REJECTED",
"message": "sabre-rest BargainFinderMaxRQ failed with status 400: 27131 - Number of connection locations exceeds maximum allowed",
"doc_url": "https://docs.gojinko.com/concepts/errors"
}
}{
"error": {
"code": "UPSTREAM_UNAVAILABLE",
"message": "All flight providers are temporarily unable to serve this search. Please retry later. Provider reasons: sabre-rest: provider temporarily closed; travelfusion: quota exhausted",
"doc_url": "https://docs.gojinko.com/concepts/errors"
}
}{
"error": {
"code": "UPSTREAM_TIMEOUT",
"message": "sabre-rest BargainFinderMaxRQ timed out after 30s",
"doc_url": "https://docs.gojinko.com/concepts/errors"
}
}flight-refund-preview
Preview what giving back a flight ticket would return to the customer
curl --request POST \
--url https://api.example.com/v1/flight_refund_preview \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"booking_ref": "JNK-A0AUR2",
"last_name": "Carrard"
}
'import requests
url = "https://api.example.com/v1/flight_refund_preview"
payload = {
"booking_ref": "JNK-A0AUR2",
"last_name": "Carrard"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({booking_ref: 'JNK-A0AUR2', last_name: 'Carrard'})
};
fetch('https://api.example.com/v1/flight_refund_preview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/v1/flight_refund_preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'booking_ref' => 'JNK-A0AUR2',
'last_name' => 'Carrard'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/flight_refund_preview"
payload := strings.NewReader("{\n \"booking_ref\": \"JNK-A0AUR2\",\n \"last_name\": \"Carrard\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/v1/flight_refund_preview")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"booking_ref\": \"JNK-A0AUR2\",\n \"last_name\": \"Carrard\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/flight_refund_preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"booking_ref\": \"JNK-A0AUR2\",\n \"last_name\": \"Carrard\"\n}"
response = http.request(request)
puts response.read_body{
"quote": "svq_01J7ZR3M8FKX2P9C",
"state": "completed",
"commitable": true,
"support_level": "AUTO",
"manual_reason": "fare rules require agent review",
"operation_kind": "cancel",
"settlement_basis": "sell_minus_penalty",
"expires_at": "2026-09-03T12:15:00Z",
"item": "itm_7f2c9a4e8b1d",
"provider": "sabre-rest",
"refund": {
"value": 41250,
"amount": 123,
"currency": "USD",
"decimal_places": 2,
"basis": "sell_minus_penalty"
},
"penalty": {
"value": 41250,
"amount": 123,
"currency": "USD",
"decimal_places": 2,
"fee_known": true
},
"documents": [
{
"number": "0012345678901",
"type": "TKT",
"state": "ACTIVE",
"recoverable": false
}
],
"ancillary_recoverable": true,
"provider_figures": {
"refund_net": {
"amount": 123,
"value": 41250,
"currency": "USD",
"decimal_places": 2
},
"penalty_net": {
"amount": 123,
"value": 41250,
"currency": "USD",
"decimal_places": 2
},
"currency": "USD",
"total_paid_net": {
"value": 41250,
"amount": 123,
"currency": "USD",
"decimal_places": 2
}
},
"not_commitable_reason": "not_cancellable"
}{
"error": {
"code": "BAD_REQUEST",
"message": "Malformed JSON in request body.",
"doc_url": "https://docs.gojinko.com/concepts/errors"
}
}{
"error": {
"code": "AUTH_REQUIRED",
"message": "Invalid or expired API key.",
"doc_url": "https://docs.gojinko.com/api-reference/authentication"
}
}{
"error": {
"code": "PAYMENT_REQUIRED",
"message": "Insufficient balance — this call costs $0.0150 and your organization has $0.0000 available. Top up at https://dashboard.gojinko.com/developers/billing/topup",
"doc_url": "https://docs.gojinko.com/concepts/errors"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "booking not found"
}
}{
"error": {
"code": "CONFLICT",
"message": "an exchange is already in progress for this booking",
"doc_url": "https://docs.gojinko.com/concepts/errors"
}
}{
"error": {
"code": "GONE",
"message": "The resource no longer exists.",
"doc_url": "https://docs.gojinko.com/concepts/errors"
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "origins: origins is required; trip_type: trip_type is required",
"doc_url": "https://docs.gojinko.com/concepts/errors"
}
}{
"error": {
"code": "RATE_LIMITED",
"message": "Rate limit or quota exceeded.",
"doc_url": "https://docs.gojinko.com/concepts/errors"
}
}{
"error": {
"code": "UPSTREAM_REJECTED",
"message": "sabre-rest BargainFinderMaxRQ failed with status 400: 27131 - Number of connection locations exceeds maximum allowed",
"doc_url": "https://docs.gojinko.com/concepts/errors"
}
}{
"error": {
"code": "UPSTREAM_UNAVAILABLE",
"message": "All flight providers are temporarily unable to serve this search. Please retry later. Provider reasons: sabre-rest: provider temporarily closed; travelfusion: quota exhausted",
"doc_url": "https://docs.gojinko.com/concepts/errors"
}
}{
"error": {
"code": "UPSTREAM_TIMEOUT",
"message": "sabre-rest BargainFinderMaxRQ timed out after 30s",
"doc_url": "https://docs.gojinko.com/concepts/errors"
}
}refund is the customer figure, what they paid less the penalty; the supplier’s own net figures are under provider_figures and are not what the customer receives. The platform decides WHICH operation this is and reports it as operation_kind: a ticket still inside its void window is void, the entire charge is reversed, penalty-free, no supplier figure is read, and provider_figures is legitimately absent, and anything else is cancel, a refund under the fare rules. You cannot ask for one; read what you are given, because the void window closes with time. commitable: false with support_level: MANUAL_REQUIRED is not a dead end: the commit takes manual_ok: true and hands the operation to a Jinko agent. The handle this returns is named quote: it is what POST /v1/flight_refund_commit consumes, and it stops binding at expires_at. Every call here needs API authentication; this is about which mode identifies the booking. Use EXACTLY ONE: provider_reference (the connector order id, the Sabre PNR or the TravelFusion reference, never the airline record locator), which additionally requires a credential that OWNS the booking, or booking_ref + last_name, which identifies it without one. Sending both is a 422.Authorizations
Body
The CONNECTOR's own order id for this flight booking — the Sabre PNR for a Sabre booking, the TravelFusion booking reference for a TravelFusion one. NOT the airline record locator, which names the carrier's own copy of the reservation and is answered 404 here, identically to an unknown booking. OWNER mode: beyond the API authentication every call needs, this one requires a credential that OWNS the booking — a tenant-bound key reaches its whole tenant, any other credential must belong to the booking's own user. Mutually exclusive with booking_ref + last_name; sending both is rejected with 422.
"QQIUIQ"
The Jinko reference. GUEST mode: pair it with last_name and the pair identifies the booking on its own — API authentication is still required, as on every call here, but the credential does not have to own the booking. Mutually exclusive with provider_reference; one without the other is rejected with 422.
"JNK-H1ZK90"
The lead traveller's surname. Required with booking_ref, and only with it.
"Carrard"
Show child attributes
Show child attributes
Response
What giving the ticket back would return
This quote ("svq_…"). Pass it to POST /v1/flight_refund_commit — it binds the commit to the figures below. Opaque; the format may evolve.
"svq_01J7ZR3M8FKX2P9C"
Lifecycle of the QUOTE, not of a refund — nothing has been refunded or voided by this call. completed means the figures are final until expires_at.
"completed"
Whether a commit against this quote would be accepted as it stands. A MANUAL_REQUIRED quote is never commitable and is still SUBMITTABLE: send the commit with manual_ok: true to hand it to a Jinko agent. Otherwise, when false, not_commitable_reason says why and committing is pointless.
true
How this refund would be carried out. AUTO — the platform refunds the ticket end to end under the fare rules. AUTO_VOID — the ticket is still inside the airline's void window, so the platform voids it and the ENTIRE charge is reversed, penalty-free; there is no supplier figure to report on a void. MANUAL_REQUIRED — it is possible, but a Jinko agent has to act (manual_reason says why): the commit is refused unless you send manual_ok: true, which hands it to that agent. Do not treat MANUAL_REQUIRED as a failure. Time-sensitive: a void window closes, so read the level from a live preview.
AUTO, AUTO_VOID, MANUAL_REQUIRED Why a person has to act. Present with support_level: MANUAL_REQUIRED.
"fare rules require agent review"
What this quote would do — refund the ticket under the fare rules (cancel) or void it (void). On a void the whole charge comes back, the penalty is zero and provider_figures is absent. The status read reports the operation that actually ran under this same name, so the two compare directly. The handle that binds this quote is quote; operation is the "svc_…" handle the COMMIT answers, and it never appears on a quote.
cancel, void How the refund is settled. sell_minus_penalty — what the customer paid for this ticket, less the penalty (a cancellation). original_charge — the whole charge is reversed, penalty-free (a void). It follows operation_kind, which the platform derives; the caller cannot ask for one.
"sell_minus_penalty"
When this quote stops binding. Committing after it answers 409 quote_expired; take a fresh quote and show the customer the new figure before committing again.
"2026-09-03T12:15:00Z"
The booked item this quote covers ("itm_…"). A booking holding several items is quoted and refunded one item at a time; within an item, every ticket issued for it is covered together.
"itm_7f2c9a4e8b1d"
Which supplier the operation would be sent to. Informational.
"sabre-rest"
THE CUSTOMER FIGURE: what would go back to the payment method, on the basis named in basis — what they paid less the penalty, or the entire charge on a void. Show this one, never provider_figures. Absent is not zero: a quote whose penalty is unknown carries no refund figure at all.
Show child attributes
Show child attributes
What the customer would forfeit, in the currency they were charged. Zero on a void. Read fee_known before showing it — false means UNKNOWN, not free.
Show child attributes
Show child attributes
Every document this operation covers, each of them active right now. Ticket subsets are not offered: the operation takes the whole item.
Show child attributes
Show child attributes
Whether the ancillaries bought with this ticket come back with it. false when any document is an EMD — the platform cannot refund or void one, so that value has to be recovered by a person, and the quote is MANUAL_REQUIRED. Tell the customer before they commit, not after.
true
The airline's own net figures, for reconciliation — never what the customer receives. refund_net is what the airline returns to Jinko, penalty_net what it withheld from Jinko and total_paid_net what it recorded as paid to it; on a ticket sold at a margin all three differ from the customer figures. Show the customer the top-level refund_amount / refund, never these. currency is the currency the airline settles in, which can differ from the currency charged. The whole object is omitted on a void (operation_kind: void): the original charge is reversed without reading any supplier figure, so there is none to report.
Show child attributes
Show child attributes
Why commitable is false. Today: manual_required (a Jinko agent has to act — resubmit with manual_ok: true), provider_unsupported (the airline offers no refund through the API), not_cancellable (this ticket cannot be given back as it stands), penalty_exceeds_sell (the penalty is at least what the customer paid), multi_currency_basis (the booking was paid across currencies and no single refund figure exists), funds_unavailable (the original payment cannot cover the refund yet), insufficient_time_to_converge (too little time is left to finish before the flight). New reasons may be added, so treat an unrecognised value as "not right now".
"not_cancellable"
