Add Packaged Item to Booking

Hello,

We are currently trying to dynamically update a booking based on a parameter in one of our bookings.

I've created a "guides" item and it is packaged into one of our events.

For every X amount of people in a booking, we require 1 guide.

I can handle the query and math on my end, I am just checking to see if I can add a packaged item to a booking while updating it through the API.

Thanks!
Tristan.

Comments

  • When creating booking, if you've added the parent item of the package to your booking session, the session response will contain a list of line items in your current session that includes details of the entire package. With these, you can select which you need using the alter array parameter in a session call; for simple priced items this would be used such as alter[1.1]=3 -- where 1.1 is the line ID, and 3 is the quantity. For rated items, you would use alter[1.1]=optin or alter[1.1]=optout to select or deselect a package attachment.

    The latter option is reliant on the parent item's parameters (which might be mapped if there are different types), while simple priced items can have any free quantity. You can, of course, always just add the item separately where neither package option is ideal.

    As far as updating existing bookings, the API isn't currently capable of adding new items to existing bookings, although it is something that has been planned for addition.
Sign In or Register to comment.