Packages

Reorder a package's item choice groups

Reorders the item_choices groups on a Package to match the supplied sequence of group IDs. Pass every existing item_choices[].id exactly once in the desired display order.

IDs not included in the order array are pushed to the tail in their original relative order, so a partial reorder simply moves the listed IDs to the front. Unknown IDs are ignored.

Returns the freshly-sorted Package. Requires the SETTINGS_MANAGE permission on the package's site.

post/shop/packages/{packageId}/item-choices/reorder

Request body

orderstring[] required

The desired sequence of item-choice group IDs. IDs not listed are appended to the tail in their existing relative order. Unknown IDs are silently ignored.

Example request

{
  "order": [
    "5dcb47800000000000000001"
  ]
}

Response

A single Package.

Example response

{
  "data": {
    "id": "5dcb47800000000000000010",
    "categories": [
      {
        "name": "Massages"
      }
    ],
    "cross_sell_offerings": [
      {
        "offering_name": "Twilight massage",
        "offering_type": "appointment"
      }
    ],
    "currency": "gbp",
    "customer_cancellation_min_duration": "P7D",
    "customer_cancellation_permitted": "allowed",
    "customer_reschedule_min_duration": "P7D",
    "customer_reschedule_permitted": "allowed",
    "description": "Buy together and save",
    "email_options": {
      "hide_prices": 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"
    },
    "item_choices": [
      {
        "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
      }
    ],
    "max_advance_bookings_interval": "P2W",
    "max_daily_duration": 240,
    "max_guests": 2,
    "max_per_basket": 1,
    "max_per_guest": 1,
    "members_only": true,
    "membership_booking_windows": [
      {
        "max_advance_bookings_interval": "P2W",
        "min_advance_bookings_interval": "P2D"
      }
    ],
    "membership_booking_windows_enabled": true,
    "min_advance_bookings_interval": "P2D",
    "min_guests": 2,
    "name": "Treatment and Yoga",
    "overnight_package_config": {
      "enabled": true,
      "rate_id": "5dcb47800000000000000010",
      "num_nights": 1
    },
    "prevent_choice_overlaps": true,
    "price_rules": [
      {
        "id": "5dcb47800000000000000010",
        "package_id": "5dcb47800000000000000010",
        "date_from": "2020-02-01",
        "date_to": "2020-04-01",
        "time_from": "10:00",
        "time_to": "14:00",
        "weekdays": [
          "monday"
        ],
        "price": 20000
      }
    ],
    "product_code": "MAS123",
    "related_retail_offerings": [
      {
        "offering_name": "Twilight massage",
        "offering_type": "appointment"
      }
    ],
    "site_id": "00000000-0000-0000-0000-111111111111",
    "standard_price": 5000,
    "upsell_offerings": [
      {
        "offering_name": "Twilight massage",
        "offering_type": "appointment"
      }
    ],
    "visibility": "public",
    "deleted_at": "2025-02-04T12:00:00+01:00",
    "updated_at": "2025-02-04T12:00:00+01:00"
  }
}

Changes

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