Skip to main content
POST
/
v1
/
hotel_cancel
Cancel a hotel booking and get a refund when eligible
curl --request POST \
  --url https://api.example.com/v1/hotel_cancel \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "provider_booking_id": "NUITEE-88231",
  "provider": "nuitee",
  "booking_ref": "JNK-H1ZK90",
  "last_name": "Carrard",
  "intent": {
    "user_intent": "find a cheap flight to Tokyo"
  }
}
'
import requests

url = "https://api.example.com/v1/hotel_cancel"

payload = {
"provider_booking_id": "NUITEE-88231",
"provider": "nuitee",
"booking_ref": "JNK-H1ZK90",
"last_name": "Carrard",
"intent": { "user_intent": "find a cheap flight to Tokyo" }
}
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({
provider_booking_id: 'NUITEE-88231',
provider: 'nuitee',
booking_ref: 'JNK-H1ZK90',
last_name: 'Carrard',
intent: {user_intent: 'find a cheap flight to Tokyo'}
})
};

fetch('https://api.example.com/v1/hotel_cancel', 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/hotel_cancel",
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([
'provider_booking_id' => 'NUITEE-88231',
'provider' => 'nuitee',
'booking_ref' => 'JNK-H1ZK90',
'last_name' => 'Carrard',
'intent' => [
'user_intent' => 'find a cheap flight to Tokyo'
]
]),
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/hotel_cancel"

payload := strings.NewReader("{\n \"provider_booking_id\": \"NUITEE-88231\",\n \"provider\": \"nuitee\",\n \"booking_ref\": \"JNK-H1ZK90\",\n \"last_name\": \"Carrard\",\n \"intent\": {\n \"user_intent\": \"find a cheap flight to Tokyo\"\n }\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/hotel_cancel")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"provider_booking_id\": \"NUITEE-88231\",\n \"provider\": \"nuitee\",\n \"booking_ref\": \"JNK-H1ZK90\",\n \"last_name\": \"Carrard\",\n \"intent\": {\n \"user_intent\": \"find a cheap flight to Tokyo\"\n }\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.example.com/v1/hotel_cancel")

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 \"provider_booking_id\": \"NUITEE-88231\",\n \"provider\": \"nuitee\",\n \"booking_ref\": \"JNK-H1ZK90\",\n \"last_name\": \"Carrard\",\n \"intent\": {\n \"user_intent\": \"find a cheap flight to Tokyo\"\n }\n}"

response = http.request(request)
puts response.read_body
{
  "provider_booking_id": "NUITEE-88231",
  "provider": "nuitee",
  "status": "cancelled",
  "refund_amount": {
    "value": 318.4,
    "amount": 123,
    "currency": "USD",
    "decimal_places": 2
  },
  "penalty_amount": {
    "value": 318.4,
    "amount": 123,
    "currency": "USD",
    "decimal_places": 2
  },
  "connector_reference": "cxl_2f90a1c3",
  "cancelled_at": "2026-06-01T12:34:56Z",
  "idempotent": false
}
{
"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": "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_ERROR",
"message": "Upstream travel provider returned an error. Please retry.",
"doc_url": "https://docs.gojinko.com/concepts/errors"
}
}
Cancel a hotel booking when the traveler can no longer make the stay or wants to drop a hotel from a multi-item trip. The call is idempotent: retrying the same cancellation re-serves the stored result rather than charging or refunding twice. Works with guest auth (booking ref + last name) or the authenticated shortcut (provider booking ID). Two auth modes:
  • Guest: booking_ref + last_name together.
  • Authenticated: provider_booking_id (optionally with provider).
The two modes are mutually exclusive.

Authorizations

X-API-Key
string
header
required

Body

application/json
provider_booking_id
string
Example:

"NUITEE-88231"

provider
string
Example:

"nuitee"

booking_ref
string
Example:

"JNK-H1ZK90"

last_name
string
Example:

"Carrard"

intent
object

Response

Cancel a hotel booking and get a refund when eligible

provider_booking_id
string
Example:

"NUITEE-88231"

provider
string
Example:

"nuitee"

status
string
Example:

"cancelled"

refund_amount
object
penalty_amount
object
connector_reference
string
Example:

"cxl_2f90a1c3"

cancelled_at
string
Example:

"2026-06-01T12:34:56Z"

idempotent
boolean
Example:

false