curl --request POST \
--url https://api.gojinko.com/v1/hotel_cancel_status \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"booking_ref": "JNK-H1ZK90",
"last_name": "Doe",
"operation": "svc_01J7ZR5Q2KME8V4T"
}
'import requests
url = "https://api.gojinko.com/v1/hotel_cancel_status"
payload = {
"booking_ref": "JNK-H1ZK90",
"last_name": "Doe",
"operation": "svc_01J7ZR5Q2KME8V4T"
}
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-H1ZK90', last_name: 'Doe', operation: 'svc_01J7ZR5Q2KME8V4T'})
};
fetch('https://api.gojinko.com/v1/hotel_cancel_status', 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.gojinko.com/v1/hotel_cancel_status",
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-H1ZK90',
'last_name' => 'Doe',
'operation' => 'svc_01J7ZR5Q2KME8V4T'
]),
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.gojinko.com/v1/hotel_cancel_status"
payload := strings.NewReader("{\n \"booking_ref\": \"JNK-H1ZK90\",\n \"last_name\": \"Doe\",\n \"operation\": \"svc_01J7ZR5Q2KME8V4T\"\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.gojinko.com/v1/hotel_cancel_status")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"booking_ref\": \"JNK-H1ZK90\",\n \"last_name\": \"Doe\",\n \"operation\": \"svc_01J7ZR5Q2KME8V4T\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gojinko.com/v1/hotel_cancel_status")
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-H1ZK90\",\n \"last_name\": \"Doe\",\n \"operation\": \"svc_01J7ZR5Q2KME8V4T\"\n}"
response = http.request(request)
puts response.read_body{
"operation": "svc_01J7ZR5Q2KME8V4T",
"state": "in_progress",
"reason": "settlement_review",
"message": "the fare rules do not allow a refund of this ticket",
"park_deadline": "2026-09-10T12:15:00Z",
"next_run_at": "2026-09-03T12:20:00Z",
"provider": {
"state": "cancelled",
"references": {
"cancellation_reference": "cxl_2f90a1c3"
}
},
"money": {
"amount": 123,
"value": 41250,
"currency": "USD",
"decimal_places": 2,
"display": "USD 412.50",
"amount_money": {
"value": 41250,
"currency": "USD",
"decimal_places": 2,
"display": "USD 412.50"
},
"direction": "refund",
"vehicle_state": "paid",
"stripe_reference": "re_3UBIxK2eZvKYlo2C"
}
}{
"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/authentication/api-keys"
}
}{
"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": "BAD_REQUEST",
"message": "<string>",
"doc_url": "<string>",
"field": "selections[1].quantity"
}
}{
"error": {
"code": "GONE",
"message": "The resource no longer exists.",
"doc_url": "https://docs.gojinko.com/concepts/errors"
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "A required field is missing or invalid.",
"doc_url": "https://docs.gojinko.com/concepts/errors"
}
}{
"error": {
"code": "RATE_LIMITED",
"message": "Too many requests. Retry after the Retry-After delay.",
"doc_url": "https://docs.gojinko.com/concepts/errors"
}
}{
"error": {
"code": "UPSTREAM_REJECTED",
"message": "The request was declined for this offer. Try another offer.",
"doc_url": "https://docs.gojinko.com/concepts/errors"
}
}{
"error": {
"code": "UPSTREAM_UNAVAILABLE",
"message": "The service is temporarily unavailable. Retry after the Retry-After delay.",
"doc_url": "https://docs.gojinko.com/concepts/errors"
}
}{
"error": {
"code": "UPSTREAM_TIMEOUT",
"message": "The request timed out before a result was available. Retry the request.",
"doc_url": "https://docs.gojinko.com/concepts/errors"
}
}hotel-cancel-status
Check how a hotel cancellation ended
curl --request POST \
--url https://api.gojinko.com/v1/hotel_cancel_status \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"booking_ref": "JNK-H1ZK90",
"last_name": "Doe",
"operation": "svc_01J7ZR5Q2KME8V4T"
}
'import requests
url = "https://api.gojinko.com/v1/hotel_cancel_status"
payload = {
"booking_ref": "JNK-H1ZK90",
"last_name": "Doe",
"operation": "svc_01J7ZR5Q2KME8V4T"
}
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-H1ZK90', last_name: 'Doe', operation: 'svc_01J7ZR5Q2KME8V4T'})
};
fetch('https://api.gojinko.com/v1/hotel_cancel_status', 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.gojinko.com/v1/hotel_cancel_status",
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-H1ZK90',
'last_name' => 'Doe',
'operation' => 'svc_01J7ZR5Q2KME8V4T'
]),
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.gojinko.com/v1/hotel_cancel_status"
payload := strings.NewReader("{\n \"booking_ref\": \"JNK-H1ZK90\",\n \"last_name\": \"Doe\",\n \"operation\": \"svc_01J7ZR5Q2KME8V4T\"\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.gojinko.com/v1/hotel_cancel_status")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"booking_ref\": \"JNK-H1ZK90\",\n \"last_name\": \"Doe\",\n \"operation\": \"svc_01J7ZR5Q2KME8V4T\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gojinko.com/v1/hotel_cancel_status")
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-H1ZK90\",\n \"last_name\": \"Doe\",\n \"operation\": \"svc_01J7ZR5Q2KME8V4T\"\n}"
response = http.request(request)
puts response.read_body{
"operation": "svc_01J7ZR5Q2KME8V4T",
"state": "in_progress",
"reason": "settlement_review",
"message": "the fare rules do not allow a refund of this ticket",
"park_deadline": "2026-09-10T12:15:00Z",
"next_run_at": "2026-09-03T12:20:00Z",
"provider": {
"state": "cancelled",
"references": {
"cancellation_reference": "cxl_2f90a1c3"
}
},
"money": {
"amount": 123,
"value": 41250,
"currency": "USD",
"decimal_places": 2,
"display": "USD 412.50",
"amount_money": {
"value": 41250,
"currency": "USD",
"decimal_places": 2,
"display": "USD 412.50"
},
"direction": "refund",
"vehicle_state": "paid",
"stripe_reference": "re_3UBIxK2eZvKYlo2C"
}
}{
"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/authentication/api-keys"
}
}{
"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": "BAD_REQUEST",
"message": "<string>",
"doc_url": "<string>",
"field": "selections[1].quantity"
}
}{
"error": {
"code": "GONE",
"message": "The resource no longer exists.",
"doc_url": "https://docs.gojinko.com/concepts/errors"
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "A required field is missing or invalid.",
"doc_url": "https://docs.gojinko.com/concepts/errors"
}
}{
"error": {
"code": "RATE_LIMITED",
"message": "Too many requests. Retry after the Retry-After delay.",
"doc_url": "https://docs.gojinko.com/concepts/errors"
}
}{
"error": {
"code": "UPSTREAM_REJECTED",
"message": "The request was declined for this offer. Try another offer.",
"doc_url": "https://docs.gojinko.com/concepts/errors"
}
}{
"error": {
"code": "UPSTREAM_UNAVAILABLE",
"message": "The service is temporarily unavailable. Retry after the Retry-After delay.",
"doc_url": "https://docs.gojinko.com/concepts/errors"
}
}{
"error": {
"code": "UPSTREAM_TIMEOUT",
"message": "The request timed out before a result was available. Retry the request.",
"doc_url": "https://docs.gojinko.com/concepts/errors"
}
}operation handle a commit (or POST /v1/hotel_cancel) returned. Read-only. state is the platform view, keep polling while it is in_progress or attention_required, both of which mean the operation is still alive. provider is what the supplier says about the booking and money is where the refund itself has got to; the two move independently, so a booking can read cancelled while the money is still in flight. Do not tell a customer they have been refunded until money.vehicle_state says paid. Same auth modes as hotel_cancel_preview.Authorizations
Body
Jinko booking reference. Call get_booking first, then select its item_id for servicing.
1"JNK-A0AUR2"
The "svc_…" handle from a commit, or from POST /v1/hotel_cancel.
"svc_01J7ZR5Q2KME8V4T"
Stable booked item ID from get_booking items[].item_id. Preserved across exchanges. Omit only when the booking has exactly one item of the requested domain; otherwise a 409 returns items to choose from.
0 < x <= 900719925474099142
Required for guest lookup. A credential that owns the booking may omit it; ownership is checked by the platform.
1"Doe"
Show child attributes
Show child attributes
Response
Where the cancellation has got to
"svc_01J7ZR5Q2KME8V4T"
Where the cancellation has got to. in_progress — running; keep polling. attention_required — stalled on something a person at Jinko has to resolve (reason names it); keep polling, and do not report it to the customer as a failure, because the booking may already be cancelled at the supplier. succeeded and failed are terminal: the supplier outcome and the money are both settled and nothing further will change.
in_progress, attention_required, succeeded, failed With state: attention_required, why the operation is stalled: the value names what Jinko has to resolve, and needs nothing from the caller. With state: failed, why it ended: provider_refused (the supplier refused before changing anything), provider_did_not_apply (the supplier’s record shows it was not applied), not_sent (it ended before anything was sent to the supplier), quote_expired (the quote it was committed on no longer stood), superseded or not_cancellable. Absent on a failed operation that recorded none.
"settlement_review"
A sentence about why a failed operation ended, where there is one: what the supplier’s refusal means, or that its price changed after the quote. Present only with state: failed; it never states the supplier’s figures.
"the fare rules do not allow a refund of this ticket"
When a parked operation stops waiting for Jinko and is settled or failed. Present with state: attention_required; it is how long "keep polling" lasts.
"2026-09-10T12:15:00Z"
When the platform next drives this operation by itself. Informational — polling sooner does not make it run sooner.
"2026-09-03T12:20:00Z"
The supplier's record. It can say cancelled while the money is still moving — that is the normal middle of a cancellation, not a discrepancy.
Show child attributes
Show child attributes
The refund and where it has got to. Read vehicle_state before telling a customer they have been refunded.
Show child attributes
Show child attributes
