> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.etera.dev/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.etera.dev/_mcp/server.

# Patch By Booking Id

PATCH https://api.etera.dev/hotel/booking/{bookingId}
Content-Type: application/json

Reference: https://docs.etera.dev/hotels/booking/hotel-booking-api/patch-by-booking-id

## Servers

- `https://api.etera.dev/hotel/booking` (Production, default)
- `https://api-stage.etera.dev/hotel/booking` (Staging)
- `https://api-dev.etera.dev/hotel/booking` (Development)

## Request

### Path parameters

- `bookingId` (string, required)

### Body (application/json)

This endpoint expects an object.

- `hotel_name` (string, optional)
- `notes` (string, optional)
- `special_requests` (string, optional)
- `paymentStatus` (BookingIdPatchRequestBodyContentApplicationJsonSchemaPaymentStatus, optional)
- `hotelName` (string, optional)
- `hotelAddress` (string, optional)
- `hotelPhone` (string, optional)
- `hotelEmail` (string, optional)
- `checkinDate` (string, optional)
- `checkoutDate` (string, optional)
- `expiresAt` (string, optional)
- `confirmationDeadline` (string, optional)
- `totalAmount` (double, optional)
- `estimatedCost` (double, optional)
- `finalCost` (double, optional)
- `subtotal` (double, optional)
- `taxesAmount` (double, optional)
- `feesAmount` (string, optional)
- `discountAmount` (double, optional)
- `depositAmount` (double, optional)
- `depositPaid` (double, optional)
- `paidAmount` (double, optional)
- `currency` (string, optional)
- `status` (string, optional)
- `confirmationCode` (string, optional)
- `providerStatus` (string, optional)
- `paymentMethod` (string, optional)
- `paymentProvider` (string, optional)
- `paymentIntentId` (string, optional)
- `paymentId` (string, optional)
- `roomName` (string, optional)
- `roomQuantity` (double, optional)
- `adultsCount` (double, optional)
- `childrenCount` (double, optional)
- `totalGuests` (double, optional)
- `ratePlanName` (string, optional)
- `mealPlan` (string, optional)
- `roomBasePrice` (double, optional)
- `roomTotalPrice` (double, optional)
- `primaryGuestFirstName` (string, optional)
- `primaryGuestLastName` (string, optional)
- `primaryGuestEmail` (string, optional)
- `primaryGuestPhone` (string, optional)
- `cancellationPolicyType` (string, optional)
- `cancellationPolicyDescription` (string, optional)
- `paymentPolicyType` (string, optional)
- `paymentPolicyDescription` (string, optional)
- `inclusions` (string, optional)
- `exclusions` (string, optional)
- `source` (string, optional)
- `referralSource` (string, optional)
- `marketingCampaign` (string, optional)
- `utmSource` (string, optional)
- `utmMedium` (string, optional)
- `utmCampaign` (string, optional)
- `utmTerm` (string, optional)
- `utmContent` (string, optional)
- `roomCategory` (string, optional)
- `roomView` (string, optional)
- `roomFloor` (string, optional)
- `roomAmenities` (string, optional)
- `smokingPreference` (string, optional)
- `bedTypePreference` (string, optional)
- `accessibilityRequirements` (string, optional)
- `petFriendly` (boolean, optional)
- `numberOfPets` (double, optional)
- `arrivalTime` (string, optional)
- `departureTime` (string, optional)
- `earlyCheckinRequested` (boolean, optional)
- `lateCheckoutRequested` (boolean, optional)
- `roomDetails` (any, optional)
- `guestDetails` (any, optional)
- `policies` (any, optional)
- `paymentOptions` (any, optional)
- `pricingBreakdown` (any, optional)
- `variantInputFields` (any, optional)

## Response

### 200

- `any`

## Errors

### 400 Bad Request Error

- `success` (boolean, required)
- `error` (string, required)
- `message` (string, required)

### 401 Unauthorized Error

- `error` (string, required)
- `message` (string, required)

## Types

### BookingIdPatchRequestBodyContentApplicationJsonSchemaPaymentStatus

- "pending"
- "completed"
- "failed"
- "refunded"

## Examples

**Request**

```json
{}
```

**SDK Code**

```python
import requests

url = "https://api.etera.dev/hotel/booking/bookingId"

payload = {}
headers = {"Content-Type": "application/json"}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.etera.dev/hotel/booking/bookingId';
const options = {method: 'PATCH', headers: {'Content-Type': 'application/json'}, body: '{}'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.etera.dev/hotel/booking/bookingId"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.etera.dev/hotel/booking/bookingId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://api.etera.dev/hotel/booking/bookingId")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://api.etera.dev/hotel/booking/bookingId', [
  'body' => '{}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.etera.dev/hotel/booking/bookingId");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.etera.dev/hotel/booking/bookingId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```