# Booking Update

### Overview

Airship allows partners to update bookings within the airship platform, to enable booking updates / cancelations / no shows to be updated.&#x20;

To update a booking, you'll need an Airship booking ID to be passed in the URL, which can be found from the [booking search](https://developers.airship.co.uk/basics/bookings/booking-search).

### Endpoint

{% tabs %}
{% tab title="POST" %}

```markup
https://api.airship.co.uk/v1/bookings/{booking_id}
```

{% endtab %}
{% endtabs %}

### Configuration

#### Path Parameters

| Field        | Notes                                                                                                                                                                                                                                                     |
| ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `booking_id` | The booking ID is Airships unique reference for the booking, and represents the booking that you are attempting to update. The booking ID can be found via the [Booking Search](https://developers.airship.co.uk/basics/bookings/booking-search) endpoint |

#### Headers

| Field                           | Notes                                                                                                                                                                                                                                                                                       |
| ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Authentication` (bearer token) | The authentication token is linked to the account that you are searching bookings in. If you are unsure of what your Authentication token is, ask our support team to confirm. More details on authentication can be found [here](https://developers.airship.co.uk/rest-api/authentication) |

#### Query parameters

The booking fields which can be accepted in this section can be found in the [Append Booking Data](https://developers.airship.co.uk/basics/contacts/append-booking-data) section, with the addition of `account_id` (required)

| Field        | Notes                                                                                                                                                    |
| ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `account_id` | The account ID represents the account that you are searching bookings in. If you are unsure of what your account ID is, ask our support team to confirm. |

### Basic update booking payload

{% tabs %}
{% tab title="Body" %}

```json
{
    "account_id": 3,
    "enquiry_datetime": "2021-04-27 20:30:00",
    "updated_at": "2021-04-27 20:30:00",
    "source_id": 16,
    "party_size": 10,
    "stage_value": 69,
    "type_id": 51,
    "unit_id": 67,
    "party_datetime": "2021-04-27 20:30:00",
    "party_enquirytime": "2021-04-27 21:00:06",
    "deposit_paid": 0.01,
    "hpbr_drink": 0,
    "hpbr_food": 0,
    "hpbr_entertainment": 0,
    "data": {
      "element_01": "My-Booking-Reference",
      "element_03": "juice",
      "element_20": "chicken"
    },
    "notes": [
      {
        "text": "Test note on bookingID",
        "time": "2021-04-27 21:00:06"
      }
    ]
}
```

{% endtab %}

{% tab title="Response" %}

```json
{
    "stage_value_status": "Deposit Secured",
    "data_element_01": "My-Booking-Reference",
    "data_element_03": "juice",
    "data_element_20": "chicken",
    "comments": [
        {
            "id": 455628,
            "text": "Test note on bookingID",
            "created_at": "2021-08-13 15:24:54"
        },
        {
            "id": 457554,
            "text": "Test note on bookingID",
            "created_at": "2021-08-26 13:43:49"
        }
    ],
    "id": 12116500,
    "account_id": "3",
    "contact_id": "47426742",
    "unit_id": 67,
    "stage_value": 69,
    "type_id": 51,
    "datetime": "2021-04-27 20:30:00",
    "source_id": 16,
    "party_datetime": "2021-04-27 20:30:00",
    "party_size": 10,
    "deposit_paid": 0.01,
    "hpbr_food": 0,
    "hpbr_drink": 0,
    "hpbr_entertainment": 0,
    "updated_at": "2021-04-27 20:30:00"
}
```

{% endtab %}
{% endtabs %}
