Tours overview

How a tour, with its itinerary and packages, is synced, published and booked.

A tour has a destination, a duration, a day-by-day itinerary and one or more packages — the ways to book it. Customers book a package. Tours need no listing setup.

OperationEndpoint
Create or replacePUT /tours/:externalId
List, retrieve, publish, unpublish, deleteRead, publish or delete at /tours

The flow#

A tour, from draft to booking
A tour, from draft to bookingYour serverLocaloyCustomer1. PUT /tours/sundarbans-3d2. 201 draft, readyToPublish3. POST …/sundarbans-3d/publishIf something is missing4. 409 tour_not_ready + blockersWhen the tour is complete5. 200 published6. Book package “std”7. Inventory check: tour/std8. Webhook: booking.createdConsultation tours and your checkoutCustomers ask first, or the booking waits for payment
  1. Your server → Localoy: PUT /tours/sundarbans-3d
  2. Localoy → Your server: 201 draft, readyToPublish
  3. Your server → Localoy: POST …/sundarbans-3d/publish
  4. — If something is missing —
  5. Localoy → Your server: 409 tour_not_ready + blockers
  6. — When the tour is complete —
  7. Localoy → Your server: 200 published
  8. Customer → Localoy: Book package “std”
  9. Localoy → Your server: Inventory check: tour/std
  10. Localoy → Your server: Webhook: booking.created
  11. — Consultation tours and your checkout —
  12. Note: Customers ask first, or the booking waits for payment
  1. PUT the whole tour, itinerary and packages included. The first PUT creates a draft (201); later ones replace it (200) and keep whether it is published.
  2. Check readyToPublish. Every response says it. A tour needs a destination, a duration, a description, at least one itinerary day and one package; otherwise publish answers 409 tour_not_ready with details.blockers.
  3. Packages keep their identity. Each package has its own externalId, unique within the tour, and is updated in place, so existing bookings keep pointing at it. Leaving out a package that has bookings is refused (409 package_has_bookings).
  4. Customers book a package. With bookingOption CONSULTATION they ask first; with DIRECT they book. Localoy asks your inventory endpoint using <tour>/<package> as the external_id (module=tour).
  5. Payment. A tour set to your own checkout in the Partner Portal stays pending until you report a successful payment.

Rules to remember#

  • A tour with bookings cannot be deleted (409 listing_has_bookings) — unpublish it.
  • Images (poster, gallery) must come from POST /media.
  • The brand colour, brochure and departure dates are set in the Partner Portal and left as they are.
  • A sandbox key validates and changes nothing ("dryRun": true).
  • A Technology Provider needs the Tours module.