> ## Documentation Index
> Fetch the complete documentation index at: https://learn.nexudus.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 📆Update resource booking

> Updates a booking for a given resource, start date and duration.

# 📆Update resource booking

Updates a booking for a given resource, start date and duration.

## Authentication

<Note>
  This endpoint requires OAuth2 authentication. Include a valid bearer token in the `Authorization` header.
</Note>

## Request Body

<ParamField body="booking_id" type="integer (int32)" required>
  The id of the booking to update.
</ParamField>

<ParamField body="marketplace_id" type="string" required>
  The unique id of your marketplace application
</ParamField>

<ParamField body="location_id" type="string" required>
  The unique id of a location
</ParamField>

<ParamField body="resource_id" type="string" required>
  The unique id of the location to get the calendar for
</ParamField>

<ParamField body="start_local" type="string (date-time)" required>
  The earliest date to show bookings for. The date and time are parsed in the local time of the passed in location.
</ParamField>

<ParamField body="fullname" type="string" required>
  The full name of the customer making this booking. Required when "email" is provided.
</ParamField>

<ParamField body="email" type="string" required>
  The email of the customer making this booking. . Required when "fullname" is provided.
</ParamField>

<ParamField body="duration_minutes" type="integer (int32)">
  The amount of minutes after the start\_local time to show data for. Defaults to 60 minutes.
</ParamField>

<ParamField body="visitors" type="array" />

<ParamField body="customer_notes" type="string">
  A note to add alongside the booking. Customers will be able to see this note.
</ParamField>

<ParamField body="internal_notes" type="string">
  A note to add alongside the booking. Only operators will be able to see this note.
</ParamField>

## Response

### 200

<ResponseField name="price" type="object" />

<ResponseField name="confirmation" type="object" />

<ResponseField name="available" type="boolean">
  Example: `false`
</ResponseField>

<ResponseField name="message" type="string">
  Example: `This resource is already booked. Please choose a different start and end times.`
</ResponseField>

<ResponseField name="error_code" type="string">
  Example: `BOOKING_CONFLICT`
</ResponseField>

```json Example Response theme={null}
{
  "price": {
    "amount": 4.81,
    "currency": "USD"
  },
  "confirmation": {
    "confirmed": false,
    "message": null,
    "booking_id": null
  },
  "available": false,
  "message": "This resource is already booked. Please choose a different start and end times.",
  "error_code": "BOOKING_CONFLICT"
}
```

## Example Request

```bash theme={null}
curl -X PUT \
  "https://spaces.nexudus.com/api/apps/marketplaceapplications/book" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
```
