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

# POST /Bookings/UpdateBookingAsync

> Update an existing booking. The bookingId field identifies which booking to update.

Update an existing booking. Accepts the same payload as `POST /Bookings`. The `bookingId` field in the request body identifies which booking to update.

<ParamField header="X-API-KEY" type="string" required>Your API key</ParamField>
<ParamField header="Content-Type" type="string" required>Must be `application/json`</ParamField>

<ParamField body="bookingId" type="string" required>The NowBookIt Booking ID to update</ParamField>
<ParamField body="time" type="string">New booking datetime in venue timezone. Format: `yyyy-MM-dd HH:mm`. Ignored if `bookingTimeAsUtc` provided.</ParamField>
<ParamField body="bookingTimeAsUtc" type="string">New booking datetime in UTC. Format: `yyyy-MM-ddTHH:mm:ssZ`. Overrides `time`.</ParamField>
<ParamField body="numOfPeople" type="integer">Updated number of guests</ParamField>
<ParamField body="serviceId" type="string">NowBookIt Service ID</ParamField>
<ParamField body="sectionId" type="string">NowBookIt Section ID</ParamField>
<ParamField body="notes" type="string">Updated booking notes</ParamField>
<ParamField body="status" type="string">Updated booking status. Use `GET /Resources/booking-statuses` for valid values.</ParamField>
<ParamField body="duration" type="integer">Updated duration in minutes</ParamField>
<ParamField body="staffId" type="string">Staff member ID</ParamField>
<ParamField body="staffName" type="string">Staff member name</ParamField>
<ParamField body="tables" type="array">Updated list of NowBookIt Table IDs</ParamField>
<ParamField body="customer" type="object">Customer details: `id`, `firstName`, `lastName`, `company`, `email`, `phone`, `address`</ParamField>
<ParamField body="links" type="array">Additional links: `[{ linkName, linkURL }]`</ParamField>

<Note>Provide either `time` or `bookingTimeAsUtc` — at least one is required.</Note>

<CodeGroup>
  ```shell curl theme={null}
  curl --location '[BASE_URL]/Bookings/UpdateBookingAsync' \
  --header 'X-API-KEY: your_api_key_here' \
  --header 'Content-Type: application/json' \
  --data '{ "bookingId": "abc-123", "numOfPeople": 6, "time": "2024-03-20 20:00" }'
  ```
</CodeGroup>

**201 Created — Example Response**

```json theme={null}
{
  "bookingId": "abc-123",
  "time": "2024-03-20 20:00",
  "numOfPeople": 6,
  "bookingStatus": "Confirmed",
  "duration": 90,
  "tableNames": ["Table 5"],
  "serviceId": "svc-001",
  "serviceName": "Dinner",
  "sectionId": "sec-1",
  "isSuccess": true,
  "errorMessage": null
}
```

| Status | Description                                                                 |
| ------ | --------------------------------------------------------------------------- |
| `201`  | Booking updated successfully                                                |
| `400`  | API key not associated with a venue                                         |
| `400`  | `No Venue Subscribed to your App.`                                          |
| `400`  | `Invalid booking status {status}. Query GET /resources/booking-statuses...` |
| `400`  | `Invalid Booking Time passed in the payload.`                               |
| `401`  | X-API-KEY missing or invalid                                                |
| `500`  | `An error occurred. Unable to Update booking.`                              |


## OpenAPI

````yaml POST /Bookings/UpdateBookingAsync
openapi: 3.0.4
info:
  title: NowBookIt IPOS Partner API
  description: >-
    REST API for integrating your POS or external system with NowBookIt's
    reservation, sales, and gift card platform.
  version: v1
  contact:
    email: platform.integrations@nowbookit.com
servers:
  - url: https://ipos.dev.nowbookit.com
    description: Development
  - url: https://ipos.nowbookit.com
    description: Production
security:
  - ApiKeyAuth: []
paths:
  /Bookings/UpdateBookingAsync:
    post:
      tags:
        - Bookings
      summary: Update Booking
      operationId: updateBooking
      parameters:
        - name: X-API-KEY
          in: header
          description: API Key authentication header
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateBookingRequest'
      responses:
        '201':
          description: Update an existing Booking from API.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateBookingResponse'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    CreateBookingRequest:
      required:
        - numOfPeople
      type: object
      properties:
        time:
          type: string
          description: >-
            Booking Date and time in Venue's Timezone. Valid Format: 'yyyy-MM-dd
            HH:mm'
          nullable: true
        bookingTimeAsUtc:
          type: string
          description: >-
            Booking Date and time in UTC Timezone. Valid Format:
            'yyyy-MM-ddTHH:mm:ssZ'
          nullable: true
        numOfPeople:
          maximum: 2147483647
          minimum: 1
          type: integer
          description: The number of guests on booking.
          format: int32
        bookingId:
          type: string
          nullable: true
        serviceId:
          type: string
          nullable: true
        sectionId:
          type: string
          nullable: true
        customer:
          $ref: '#/components/schemas/Customer'
        notes:
          type: string
          nullable: true
        tables:
          type: array
          items:
            type: string
          description: Nominate NBI Table Ids for this Booking.
          nullable: true
        links:
          type: array
          items:
            $ref: '#/components/schemas/Data'
          nullable: true
        status:
          type: string
          nullable: true
        duration:
          type: integer
          description: The Booking duration in Minutes.
          format: int32
          nullable: true
        staffId:
          type: string
          nullable: true
        staffName:
          type: string
          nullable: true
      additionalProperties: false
    CreateBookingResponse:
      type: object
      properties:
        bookingId:
          type: string
          description: The new NBI Booking Id.
          nullable: true
        time:
          type: string
          description: The Booking Date and Time.
          format: date-time
        numOfPeople:
          type: integer
          format: int32
        bookingStatus:
          type: string
          nullable: true
        duration:
          type: integer
          format: int32
        tableNames:
          type: array
          items:
            type: string
          nullable: true
        serviceId:
          type: string
          nullable: true
        serviceName:
          type: string
          nullable: true
        sectionId:
          type: string
          nullable: true
        isSuccess:
          type: boolean
        errorMessage:
          type: string
          nullable: true
      additionalProperties: false
    Customer:
      type: object
      properties:
        id:
          type: string
          description: The NBI Customer unique Id.
          nullable: true
        firstName:
          type: string
          nullable: true
        lastName:
          type: string
          nullable: true
        company:
          type: string
          nullable: true
        email:
          type: string
          nullable: true
        phone:
          type: string
          description: Phone including international code.
          nullable: true
        address:
          $ref: '#/components/schemas/Address'
      additionalProperties: false
    Data:
      type: object
      properties:
        linkName:
          type: string
          nullable: true
        linkURL:
          type: string
          nullable: true
      additionalProperties: false
    Address:
      type: object
      properties:
        line1:
          type: string
          nullable: true
        line2:
          type: string
          nullable: true
        city:
          type: string
          nullable: true
        state:
          type: string
          nullable: true
        postalCode:
          type: string
          nullable: true
        country:
          type: string
          nullable: true
      additionalProperties: false
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````