Update a booking

PATCH
/bookings/{id}

Updates a booking's billing address, purchase order number, VAT number, and booking-level custom fields. Customer details are POST-only and cannot be changed via PATCH; including customer in the request body returns 422. Only the fields sent are updated (merge semantics); omitted fields are not cleared.

To change custom field answers, send custom_fields as an array in the same shape the booking returns. Only changed answers will be updated, so you can send a single answer or send back the whole array you read.

Allowed states: pending, pending_payment, completed (subject to payment-plan and Stripe bank-transfer guards) → returns 200. Rejected states: cancelled, and non-editable paid bookings → returns 422.

Path Parameters

id*string

Booking prefixed ID (e.g. bk_mR2nL5pW) or human-readable booking reference (e.g. SWG-4829)

Header Parameters

Idempotency-Key?string

Client-generated key for idempotent writes; the server deduplicates retries within a 24-hour window.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

billing_address?

Billing address for the booking.

purchase_order_number?string

Purchase order number for the booking.

vat_number?string

VAT registration number for the billing entity.

custom_fields?array<>

The booking custom field answers to change, in the same shape the booking returns them. Answers you leave out stay as they are. Answers you send back unchanged are skipped, including answers to custom fields that have since been deleted.

Response Body

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/bookings/string" \  -H "Easol-API-Version: 2026-11-01" \  -H "Content-Type: application/json" \  -d '{}'
{
  "object": "booking",
  "id": "string",
  "reference": "string",
  "state": "pending",
  "sales_channel": "string",
  "total": {
    "amount": 0,
    "currency": "string"
  },
  "subtotal": {
    "amount": 0,
    "currency": "string"
  },
  "balance": {
    "amount": 0,
    "currency": "string"
  },
  "customer": {
    "object": "customer",
    "id": "string",
    "first_name": "string",
    "last_name": "string",
    "email": "user@example.com",
    "phone": "+447762000000",
    "email_marketing_consent": {
      "consented": true,
      "consented_at": "2026-09-04T10:00:00Z"
    },
    "sms_marketing_consent": {
      "consented": true,
      "consented_at": "2026-09-04T10:00:00Z"
    }
  },
  "billing_address": {
    "line_one": "string",
    "line_two": "string",
    "city": "string",
    "post_code": "string",
    "country_code": "string",
    "subdivision_code": "string"
  },
  "purchase_order_number": "string",
  "vat_number": "string",
  "expires_at": "string",
  "cancelled_at": "string",
  "created_at": "string",
  "custom_fields": [
    {
      "custom_field_id": "fld_aBcDeFgHiJ",
      "key": "flight_number",
      "type": "text",
      "value": "BA2612",
      "option": {
        "id": "string",
        "value": "string"
      }
    }
  ],
  "first_visit": {
    "object": "customer_visit",
    "id": "visit_7hK2mQ9x",
    "occurred_at": "2026-09-04T10:00:00Z",
    "landing_page": "https://shop.example.com/",
    "referrer_url": "https://partner.example.com/",
    "referral_code": "ExternalPartner"
  },
  "last_visit": {
    "object": "customer_visit",
    "id": "visit_7hK2mQ9x",
    "occurred_at": "2026-09-04T10:00:00Z",
    "landing_page": "https://shop.example.com/",
    "referrer_url": "https://partner.example.com/",
    "referral_code": "ExternalPartner"
  },
  "line_items": {
    "object": "list",
    "url": "string",
    "has_more": false,
    "next_cursor": "string",
    "data": [
      {
        "object": "line_item",
        "id": "string",
        "variant_id": "string",
        "product_id": "string",
        "quantity": 1,
        "state": "pending",
        "variant_name": "string",
        "product_name": "string",
        "start_date": "2019-08-24",
        "end_date": "2027-04-19",
        "start_time": "string",
        "experience_slot_id": "string",
        "total": {
          "amount": 0,
          "currency": "string"
        },
        "guest_count": 2,
        "allocated_resources": {
          "object": "list",
          "url": "string",
          "has_more": false,
          "next_cursor": "string",
          "data": [
            {
              "object": "resource",
              "id": "string",
              "name": "string",
              "resource_group_name": "string"
            }
          ]
        }
      }
    ]
  },
  "guests": {
    "object": "list",
    "url": "string",
    "has_more": false,
    "next_cursor": "string",
    "data": [
      {
        "object": "guest",
        "id": "string",
        "first_name": "string",
        "last_name": "string",
        "email": "string",
        "phone": "+447762000000",
        "line_item_id": "string",
        "check_in_status": "pending",
        "is_lead": true,
        "custom_fields": [
          {
            "custom_field_id": "fld_aBcDeFgHiJ",
            "key": "flight_number",
            "type": "text",
            "value": "BA2612",
            "option": {
              "id": "string",
              "value": "string"
            }
          }
        ]
      }
    ]
  }
}
{
  "error": {
    "code": "string",
    "message": "string"
  }
}
{
  "error": {
    "code": "string",
    "message": "string"
  }
}
{
  "error": {
    "code": "string",
    "message": "string"
  }
}