# Update booking

This endpoint is for updating a booking.

Endpoint: PATCH /bookings/{bookingId}
Version: 1.0
Security: JWT

## Path parameters:

  - `bookingId` (string, required)
    Id of the booking in Tyro Connect that should be updated

## Header parameters:

  - `Authorization` (string, required)

  - `Accept` (string, required)
    Specifies which version of the API to use. If no value is provided then 0.1 version will be used
    Enum: "application/vnd.tyro.connect+json;version=1.0", "application/vnd.tyro.connect+json;version=0.1"

  - `Content-Type` (string, required)
    Enum: "application/json"

## Request fields (application/merge-patch+json):

  - `asset` (object)

  - `asset.tableStatus` (string)
    The current table status of the booking
The supported statuses are:
* SEATED - indicates that the customer connected to the booking has been seated.
* DINING - indicate that the customer connected to the booking has started dining.
* CLOSING - indicates that the customer connected to the booking is close to finishing their meal (e.g. when the bill has been printed).
* FINALISED - indicates that the booking has been finalised (e.g. when the bill has been finalised).
    Enum: "SEATED", "DINING", "CLOSING", "FINALISED"

  - `asset.arrivalStatus` (string)
    The customer's arrival status in relation to the booking
    Enum: "ON_TIME", "EARLY", "RUNNING_LATE", "NO_SHOW"

  - `asset.tables` (array)
    The tables used for the booking

  - `asset.tables.number` (string)
    The table number or table id. This field accepts alphanumeric characters e.g MAIN-33
    Example: "MAIN-33"

  - `asset.section` (object)
    The section within the venue

  - `asset.section.id` (string)
    The POS system's Id of the section

  - `asset.section.name` (string)
    The readable name of the section. E.g. Front bar, drive through for hospitality or for retail men's clothes, women's shoes etc

  - `asset.rooms` (array)
    The rooms in the booking

  - `asset.rooms.number` (string, required)
    The room number or room id. This field accepts alphanumeric characters e.g MAIN-33
    Example: "MAIN-33"

  - `asset.discounts` (array)

  - `asset.preOrders` (array)

  - `bookingStatus` (string)
    The current status of the booking
    Enum: "CREATED", "ACCEPTED", "CANCELLED_BY_CUSTOMER", "CANCELLED_BY_MERCHANT", "REJECTED"

  - `numberOfPeople` (number)
    The number of expected guests

  - `payments` (array)
    A list of payments applied to the booking.

  - `payments.amount` (integer)
    This is the amount in cents. e.g 12520 is $125.20

  - `payments.currency` (string)
    This is always AUD
    Enum: "AUD"

  - `payments.description` (string)
    A description of what this payment amount represents
    Example: "Deposit for booking"

  - `reason` (string)
    The reason the booking was rejected or cancelled. Provided only when bookingStatus is REJECTED, CANCELLED_BY_MERCHANT or CANCELLED_BY_CUSTOMER

  - `customer` (object)
    The customer making the booking

  - `customer.id` (string)

  - `customer.name` (string)
    Customer's name

  - `customer.notes` (string)
    Notes specific to the customer. For example, 'Loves red wine'.

  - `customer.email` (string)
    Customer's email address

  - `customer.address` (object)
    The customer address

  - `customer.address.line1` (string)

  - `customer.address.line2` (string)

  - `customer.address.suburb` (string)

  - `customer.address.state` (string)

  - `customer.address.postcode` (string)

  - `customer.address.country` (string)

  - `customer.phoneNumber` (string)
    Customer's phone number

  - `customer.birthday` (string)
    Customer's birthday

  - `notes` (string)
    Notes specific to the booking. Example: 'Window seat please'

  - `startTime` (string)
    The format of the date time is the notation as defined by [RFC 3339, section 5.6](https://tools.ietf.org/html/rfc3339#section-5.6)

  - `endTime` (string)
    The format of the date time is the notation as defined by [RFC 3339, section 5.6](https://tools.ietf.org/html/rfc3339#section-5.6)

  - `origin` (object)
    Information relevant to the booking partner that this booking was created with

  - `origin.name` (string)
    Name of the booking app

  - `origin.bookingReference` (string, required)
    Reference for the booking. It is used to facilitate identification of the booking in the app and pos systems and must be unique per location and booking partner.

## Response 400 fields (application/json):

  - `error` (string)
    The validation error message.

## Response 404 fields (application/json):

  - `error` (string)
    The validation error message.


## Response 204 fields

## Response 403 fields
