Add a line item to a booking

POST
/bookings/{booking_id}/line-items

Adds a line item to an existing booking, reserving stock for the specified variant, date, time and party size. The booking must be in pending state.

Returns the full booking resource including all line items.

subtotal is the price of the line items. It already contains any tax included in those prices. total and balance add any tax charged on top of the price.

Allowed states: pending → returns 201. Rejected states: pending_payment, completed, cancelled → returns 422.

Path Parameters

booking_id*string

Booking prefixed ID (e.g. bk_mR2nL5pW)

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.

product_id?string

Package product ID (e.g. pkg_mR2nL5pW). Required when variant_id is omitted.

variant_id?variant_id

Variant ID. A variant is the bookable unit within a product (e.g. a room type within an accommodation, or a ticket on an experience). The variant prefix mirrors its parent product's prefix with a trailing v:

PrefixParent product prefixParent typeDescription
accv_acc_AccommodationA room type within an accommodation (e.g. Deluxe Double).
expv_exp_ExperienceA ticket or slot on an experience (e.g. VIP pass, 14:00 slot).
quantity?integer

Number of units of the variant to book.

Range1 <= value
adult_count*integer

Number of adult guests

Range0 <= value
start_date*start_date

ISO 8601 local date (e.g. 2026-04-15).

Formatdate
start_time?start_time

Local start time in HH:MM format (e.g. 14:00).

expiration_minutes?integer

Optional. Requested reservation hold time in minutes for a timed hold. Honoured as requested and not capped to the company's configured maximum.

Range1 <= value
hold_stock?boolean

Optional. Controls whether the booking holds stock. Omit to follow the creator's reserved-cart setting. Set true to hold: with expiration_minutes for a timed hold, or omit expiration_minutes to hold until the booking is paid for or cancelled. Set false to never hold stock, even when the creator has reserved carts enabled.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/bookings/string/line-items" \  -H "Easol-API-Version: 2026-11-01" \  -H "Content-Type: application/json" \  -d '{    "adult_count": 0,    "start_date": "2019-08-24"  }'
{
  "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"
  }
}
{
  "error": {
    "code": "string",
    "message": "string"
  }
}