Packages

Update a package item choice

Updates a PackageItemChoice on a Package. Every field is optional; only the fields you send are written. Update is the only place where start_time_rules, allow_overlaps and choice_configuration can be set.

Setting visible: false is only valid when offering_type is product; other types return 400. When max_options becomes 1 any option_budget is dropped server-side. When the parent package's prevent_choice_overlaps is not true, allow_overlaps is forced to null.

Requires the SETTINGS_MANAGE permission on the package's site.

put/shop/packages/{packageId}/item-choices/{itemChoiceId}

Request body

namestring

A short, customer-facing label for the choice.

descriptionstring nullable

A longer explanation rendered alongside the options at booking time.

min_optionsinteger

Minimum number of options the customer must pick.

max_optionsinteger nullable

Maximum number of options the customer may pick. With max_options: 1 any option_budget is dropped.

option_budgetinteger nullable

Included budget for the chosen options in the smallest currency unit.

auto_select_timeslotboolean

Whether the booking engine should auto-pick a timeslot for this choice.

hide_timesboolean

Hide individual option start times from the customer-facing booking flow.

optionalboolean

Whether the customer can skip this choice entirely.

visibleboolean

Whether the choice is visible to the customer. Setting visible: false is only allowed when offering_type is product; other types return 400.

offering_type'appointment' | 'area_booking' | 'hotel_room_reservation' | 'product' | 'session' | 'table_reservation'

The type of offerings this choice's options reference.

allow_overlapsboolean

Allow this choice's items to overlap with other items even when prevent_choice_overlaps is true on the parent package. Has no effect unless the package opts in to overlap prevention.

choice_configurationobject

Free-form additional configuration for the choice. Shape depends on offering_type.

Example request

{
  "name": "Massage",
  "description": "Choose your type of massage.",
  "min_options": 1,
  "max_options": 2,
  "option_budget": 6000,
  "allocation": {
    "revenue_centre": "treatments",
    "amount": 4000
  },
  "start_time_rules": [
    {
      "type": "relative",
      "relative_mins_to": 30,
      "absolute_time_from": "12:00",
      "absolute_time_to": "12:30"
    }
  ],
  "options": [
    {
      "id": "5dcb47800000000000000026",
      "price_change": 2000
    }
  ]
}

Response

A single PackageItemChoice on a Package.

Example response

{
  "data": {
    "id": "5dcb47800000000000000025",
    "allow_overlaps": true,
    "auto_select_timeslot": true,
    "description": "Choose your type of massage.",
    "hide_times": true,
    "name": "Massage",
    "max_options": 2,
    "min_options": 1,
    "option_budget": 2000,
    "optional": true,
    "options": [
      {
        "id": "5dcb47800000000000000026",
        "item_type": "appointment",
        "offering": {
          "id": "5e932c0901d210625e3a8766",
          "categories": [
            {
              "id": "5e932c0901d210625e3a8766",
              "name": "Massage"
            }
          ],
          "currency": "gbp",
          "description": "Choose from classic, deep tissue and Swedish massage",
          "discounted_price_from": 4500,
          "duration": 30,
          "durations": [
            30
          ],
          "has_availability": true,
          "image": {
            "file_name": "super-cool-photo.jpg",
            "mime_type": "image/jpeg",
            "original_url": "https://example.com/media/super-cool-photo.jpg",
            "size": 84256,
            "url": "https://example.com/media/super-cool-photo-thumbnail@2x.jpg"
          },
          "max_guests": 2,
          "min_guests": 2,
          "name": "60 minute massage",
          "price_from": 5000,
          "price_to": 6500,
          "type": "appointment"
        },
        "price_change": 2000
      }
    ],
    "start_time_rules": [
      {
        "absolute_time_from": "12:00",
        "absolute_time_to": "12:30",
        "relative_mins_to": 30
      }
    ],
    "visible": true
  }
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.