ResytechResytech Docs

Activities, Calendar & Timeslots

Browse activities, check availability calendars, retrieve time slots, and discover eligible add-ons using the ResytechApi client.

This page covers the read-side of the booking flow: fetching activity details, checking calendar availability, loading time slots for a given date, and discovering eligible add-ons.

All examples assume you have already initialized the API client:

const api = new ResytechApi({ debug: true });
const init = await api.initialization.initialize({ identifier: 'session-1' });

All response types on this page extend ApiResponseBase, which adds message, statusCode, action, and isNetworkError on top of the fields shown below. Always check success before reading the payload.

Activities

getActivity

Retrieve full details for a single activity, including equipment, durations, media, custom fields, agreements, and trip protection settings.

const result = await api.activity.getActivity('activity-uuid');

if (result.success) {
  const activity = result.activity;
  console.log(activity.name, '- Base price:', activity.basePrice);
}

Parameters

ParameterTypeRequiredDescription
uuidstringYesActivity unique identifier
holdsActivityReadHoldsNoOnly for an activity booked through a distance service, on a page with no trip token: { cartKey } for a cart being restored, { invoice } for an invoice being paid. Every other read ignores it.

ActivityResponse

FieldTypeDescription
successbooleanWhether the request succeeded
activityActivityFull activity details (see below)
distanceServicestringSent with success: false when the activity is booked only through a distance service this visitor may use: the service to send them to
distanceDropOffstringThe drop-off address of the trip this session holds for the activity

Activity Type

FieldTypeDescription
uuidstringUnique identifier
namestringDisplay name
basePricenumberBase price as a decimal, in the operator's currency (operator.currency from initialize)
descriptionstringFull description
cancellationPolicystringCancellation policy text
detailsstringAdditional details
mediaMedia[]Images and videos
durationsDuration[]Available booking durations
equipmentEquipment[]Available equipment (boats, kayaks, etc.)
manifestManifestGuest limits, age restrictions, demographics
firstAvailableDateDateEarliest bookable date
allowEquipmentMixingbooleanWhether customers can book multiple equipment types
maxEquipmentPerBookingnumberMax equipment items per booking
customFieldsCustomField[]Custom form fields for checkout
agreementsActivityAgreement[]Agreements the customer must accept
typenumberActivity type identifier
priceTypenumber0 Per Booking, 1 Per Person, 2 Per Equipment, 3 Per Group
includedGuestsnumberPer Group only: guests covered by the duration (group) price. 0 otherwise. 1 when the durations are priced by group size (see Duration.groupSizePrices).
additionalGuestPricenumberPer Group only: rate charged per guest above includedGuests. 0 otherwise, and 0 when priced by group size.
allowPrivateToursbooleanWhether customers may book a departure exclusively
privateToursOnlybooleanEvery booking is private: hide the private toggle and show a label; the server forces isPrivateTour on regardless of the request
dynamicDurationSettingsActivityDynamicDurationSettingDynamic duration config
schedulingActivitySchedulingDate range and cutoff settings
tripProtectionTripProtectionTrip protection configuration

Supporting Types

Duration

FieldTypeDescription
uuidstringDuration identifier (pass to cart/calendar requests)
minutesnumberDuration length in minutes
pricenumberBase price for this duration
groupSizePricesGroupSizePriceTier[]?Per Group "price by group size" bands ({ maxGuests, price }, base prices before modifiers). Band 1 covers 1 to maxGuests guests and equals price; each band starts one above the previous maxGuests. The last band's maxGuests is the largest party bookable online (a bigger party fails with error code 30). Absent = includedGuests / additionalGuestPrice pricing.

Equipment

FieldTypeDescription
uuidstringEquipment identifier
namestringDisplay name
descriptionstringShort description
detailsstringDetailed info
quantitynumberTotal inventory
capacitynumberSeats per unit
mediaMedia[]Images
addonsAddon[]Equipment-specific add-ons
amenitiesAmenity[]Equipment amenities
propertiesEquipmentProperty[]Custom properties (e.g., length, weight)

Manifest

FieldTypeDescription
guestLimitnumberMaximum guests per booking
ageRestrictionnumberMinimum age
guestMinimumnumberMinimum guests per booking
demographicsDemographic[]Guest demographics (adults, children, etc.)

Media

FieldTypeDescription
uuidstringMedia identifier
ordernumberDisplay order
typenumberMedia type (image, video, etc.)
uristringFull-size URL
thumbnailUristringThumbnail URL

Addon

FieldTypeDescription
uuidstringAdd-on identifier
namestringDisplay name
descriptionstringDescription
pricenumberPrice per unit

Amenity

FieldTypeDescription
idstringAmenity identifier
namestringDisplay name
descriptionstringDescription
iconTypenumberIcon type indicator
iconstringIcon name or URI
assignmentCountnumberNumber of equipment items this amenity is assigned to

EquipmentProperty

FieldTypeDescription
idstringProperty identifier
namestringProperty name (e.g., "Length")
valuestringProperty value (e.g., "12 ft")
descriptionstringOptional description
iconTypenumberIcon type indicator
iconstringIcon name or URI
featuredbooleanWhether to highlight this property

Demographic

FieldTypeDescription
uuidstringDemographic identifier
titlestringDisplay name (e.g., "Adult", "Child")
descriptionstringDescription

CustomField

FieldTypeDescription
uuidstringField identifier
typenumberField type code (see below)
labelstringField label shown to the customer
requiredbooleanWhether the customer must answer

Field type codes and the answer format each expects in CustomFieldAnswer.answer:

CodeTypeAnswer format
0TextareaFree text
1Text inputFree text
2, 5SignaturePNG data URL (data:image/png;base64,...)
3DateYYYY-MM-DD
4TimeHH:MM (24-hour)
6Government ID uploadJSON { "name", "type", "data" } where data is an image data URL
7EmailEmail address
8PhonePhone number, 7 to 15 digits, formatting characters allowed
9URLAbsolute http or https URL
10AddressOne formatted address line, at most 500 characters
11SelectExactly one option label from config.options
12Multi-selectOne or more option labels from config.options, joined with ,

Types 11 and 12 carry a config document:

{ "version": 1, "options": [ { "label": "Small", "description": "Up to 5ft" }, { "label": "Large" } ] }

Answers are matched case-insensitively and stored using the operator's spelling, in the order the options are defined. Only multi-select labels forbid commas, so their answers can be split on , safely; select answers match one whole label. Choice answers allow 5,098 characters, enough for all 50 labels of up to 100 characters plus separators. config is absent on every other field type; treat unknown keys as ignorable and version as a writer marker while reading compatible properties. Creating a choice field or changing its type requires config. Updating an unchanged choice type without config preserves the stored document; an explicitly empty option list is rejected.

An operator using the Commission plugin can add a field that lists their own people ("Who helped you today?"). It reaches you as an ordinary 11 or 12 whose config.options are those people's names, so render and answer it like any other select. Three things differ. Its option list follows the operator's people, so it can change between requests and can hold more than 50 names; an answer may be as long as every option it offers joined together, so a guest can pick all of them. A rejected answer does not list the options in the error message, because the list can be long; the options you were sent with the activity are the ones to show. And the field is left out of customFields altogether while it has nobody to offer, so read the field list with the activity each time instead of keeping an old copy.

ActivityAgreement

FieldTypeDescription
uuidstringAgreement identifier
titlestringAgreement title
bodystringAgreement body text
requiredbooleanWhether the customer must accept
enabledbooleanWhether this agreement is active

ActivityDynamicDurationSetting

FieldTypeDescription
enabledbooleanWhether dynamic durations are enabled
minimumHoursnumberMinimum bookable duration in hours
maximumHoursnumberMaximum bookable duration in hours
incrementMinutesnumberAllowed increment (in minutes) between min and max
baseHourlyRatenumberHourly rate used for pricing
createdAtDateCreated timestamp
updatedAtDateLast updated timestamp

ActivityScheduling

FieldTypeDescription
dateTypenumberDate selection mode (range vs specific dates)
dateRangeDateOnlyRangeBookable date range (when dateType is range)
specificDatesstring[]Bookable dates (when dateType is specific dates)
earlyCutoffTypenumberCutoff unit (hours, days, etc.)
earlyCutoffValuenumberHow far in advance bookings must be made
futureCutoffDaysnumberHow far into the future bookings can be made

TripProtection

FieldTypeDescription
enabledbooleanWhether trip protection is offered
pricingTypenumberPricing mode (flat amount vs percent)
flatAmountnumberFlat fee when pricingType is flat
percentAmountnumberPercentage when pricingType is percent
coverageTypenumberCoverage mode
coverageAmountnumberAmount of coverage provided
customTitlestringCustom display title
customDescriptionstringCustom description shown to the customer

Calendar

Calendar endpoints return monthly availability data. Use them to build date pickers that show which days have open slots.

getActivityCalendar

Get availability for a specific activity in a given month.

const calendar = await api.calendar.getActivityCalendar({
  activity: 'activity-uuid',
  month: 7,
  year: 2025,
  includePrices: true
});

if (calendar.success) {
  calendar.calendar.days.forEach(day => {
    console.log(day.date, day.isAvailable ? `$${day.price}` : 'unavailable');
  });
}

getCartCalendar

Same as getActivityCalendar, but returns availability that accounts for items already in the cart. Use this when the customer is adding a second activity to an existing booking.

const calendar = await api.calendar.getCartCalendar({
  activity: 'activity-uuid',
  month: 7,
  year: 2025,
  cartId: 'existing-cart-id'
});

ActivityCalendarRequest

FieldTypeRequiredDescription
activitystringYesActivity UUID
monthnumberYesMonth (1-12)
yearnumberYesYear (e.g. 2025)
includePricesbooleanNoInclude per-day pricing
durationstringNoDuration UUID to filter by
startTimestringNoFilter by start time
equipmentClientShoppingCartEquipment[]NoEquipment selection to check against
durationMinsnumberNoDuration in minutes (for dynamic durations)
cartIdstringNoCart ID (used by getCartCalendar)

CalendarResponse

FieldTypeDescription
successbooleanWhether the request succeeded
calendarCalendarMonthMonth data with daily availability

CalendarMonth

FieldTypeDescription
monthnumberMonth number (1-12)
yearnumberYear
daysActivityCalendarDay[]Array of day objects

ActivityCalendarDay

FieldTypeDescription
datestringDate string (YYYY-MM-DD)
isAvailablebooleanWhether there is availability on this day
pricenumberStarting price for this day (if includePrices was true)
isEstimatedPricebooleanWhether the price is an estimate
blackoutMessagestringReason the day is blacked out (if applicable)

Time Slots

Once the customer selects a date, load the available time slots for that day.

getActivityTimeSlots

Get time slots for a specific activity on a given date.

const slots = await api.timeslots.getActivityTimeSlots({
  activity: 'activity-uuid',
  date: '2025-07-15',
  durationMins: 60
});

if (slots.success) {
  slots.timeSlots.forEach(slot => {
    console.log(`Price: $${slot.price}, Seats left: ${slot.remainingSeats}`);
  });
}

getLocationTimeSlots

Get time slots for all activities at the location. Useful for location-wide availability views.

const locationSlots = await api.timeslots.getLocationTimeSlots({
  date: '2025-07-15',
  durationMins: 60
});

if (locationSlots.success) {
  locationSlots.results.forEach(activitySlots => {
    console.log('Activity:', activitySlots.uuid);
    console.log('Slots:', activitySlots.slots?.length);
    console.log('Next available:', activitySlots.nextAvailableDate);
  });
}

getCartTimeSlots

Get time slots that account for items already in the active cart.

const cartSlots = await api.timeslots.getCartTimeSlots({
  date: '2025-07-15',
  durationMins: 60
});

TimeSlotRequest

FieldTypeRequiredDescription
datestringYesDate in YYYY-MM-DD format
activitystringNoActivity UUID (recommended for activity-specific queries)
durationstringNoDuration UUID
durationMinsnumberNoDuration in minutes (for dynamic durations)
equipmentClientShoppingCartEquipment[]NoEquipment selection to check availability against
isPrivateTourbooleanNoFilter for private tour availability (a departure with any existing booking is unavailable). Implied for activities with privateToursOnly.
ignoreEarlyCutoffbooleanNoDeprecated. Ignored: the activity's early cutoff always applies to customer bookings.

ActivityTimeSlotsResponse

Returned by getActivityTimeSlots and getCartTimeSlots.

FieldTypeDescription
successbooleanWhether the request succeeded
timeSlotsActivityTimeSlot[]Available time slots

LocationTimeSlotsResponse

Returned by getLocationTimeSlots.

FieldTypeDescription
successbooleanWhether the request succeeded
resultsLocationAllActivityTimeSlots[]Slots grouped by activity

ActivityTimeSlot

FieldTypeDescription
startDateDateSlot start (full datetime)
endDateDateSlot end (full datetime)
durationMinutesnumberSlot length in minutes
pricenumberPrice for this time slot
isAvailablebooleanWhether this slot can be booked
remainingSeatsnumberNumber of seats still available (tour activities)
canBookPrivateTourbooleanWhether a private tour can be booked at this time
blackoutMessagestringOperator-supplied reason the slot is unavailable, populated only when a location blackout blocks the slot. Activity-level blackouts do not surface a message.

LocationAllActivityTimeSlots

FieldTypeDescription
uuidstringActivity UUID
slotsActivityTimeSlot[]Available slots for this activity
nextAvailableDatestringNext date with availability (if no slots on requested date)

Add-ons

getEligibleAddons

Retrieve add-ons that are available for a given activity, date, and time combination.

const addons = await api.addon.getEligibleAddons({
  activity: 'activity-uuid',
  date: '2025-07-15',
  time: '10:00'
});

if (addons.success) {
  addons.addons.forEach(addon => {
    console.log(`${addon.name} - $${addon.price} (${addon.quantity} available)`);
  });
}

GetEligibleAddonsRequest

FieldTypeRequiredDescription
activitystringYesActivity UUID
datestringYesDate in YYYY-MM-DD format
timestringYesTime in HH:mm format
durationstringNoDuration UUID
dynamicDurationMinutesnumberNoDuration in minutes (for dynamic durations)
equipmentClientShoppingCartEquipment[]NoEquipment selection for context

GetEligibleAddonsResponse

FieldTypeDescription
successbooleanWhether the request succeeded
addonsEligibleAddon[]List of eligible add-ons

EligibleAddon

FieldTypeDescription
uuidstringAdd-on identifier
namestringDisplay name
descriptionstringDescription
pricenumberPrice per unit
quantitynumberAvailable quantity
mediaUristringImage URL

Distance Services

A distance service is something the operator prices by how far it goes: a hotel car service that is free nearby and paid further out, a shuttle, a delivery (the Distance Pricing plugin). The guest gives an address. The server measures the road distance from the service's starting point and answers with the one activity that distance books. From there it is booked like any other activity, and the booking gets the address as its drop-off answer.

Most locations have none. If you only need a button that opens the hosted address step, use Distance Service Mode on the modal instead.

The flow

// 1. Which services is this visitor offered? Usually none.
const services = api.getDistanceServices() ?? [];

// 2. The address step: heading, starting point, the operator's landmarks
const page = await api.distance.getService(services[0].uuid);
// page.success false: not offered. page.configured false: lookup is not set up.
// Either way, offer nothing.
const service = page.service;

// 3. Suggestions as the guest types. One session per address.
let session = api.distance.newSession();
const found = await api.distance.search(service.uuid, '875 N Mich', session);
// found.suggestions: [{ placeId, description, mainText, secondaryText }]

// 4. Measure the place the guest picked, or a landmark ({ landmarkId })
const trip = await api.distance.lookup(service.uuid, {
  placeId: found.suggestions[0].placeId,
  session
});
session = api.distance.newSession();              // the next address is a new session

if (trip.success && trip.inRange) {
  // Show trip.distance + unit, trip.address and the trip.mapUrl image.
  // The library now holds the trip's token and sends it from here on.
  const { activity } = await api.activity.getActivity(trip.activity);
  // ...calendar, time slots, cart and checkout as for any activity
} else if (trip.success) {
  // Measured, and beyond the service's reach. trip.message is the operator's wording.
} else {
  // trip.message: the place was not found, or lookup is unavailable right now
}

getService

const page = await api.distance.getService('service-uuid');
FieldTypeDescription
successbooleanFalse for a service that does not exist, or is not offered to this visitor. The two answer the same.
configuredbooleanFalse: address lookup is not set up on the server. Offer nothing.
service.uuidstringService UUID
service.titlestringThe service's name
service.headingstringHeading for the address step. Use title when absent.
service.introstringIntroduction text
service.startLabelstringWhere distances are measured from, as the operator named it
service.unit0 | 10 miles, 1 kilometres
service.landmarksDistanceLandmarkGroup[][{ name, landmarks: [{ id, label }] }]: common destinations, in the operator's groups
const found = await api.distance.search('service-uuid', input, session);

Suggestions are limited by the server to the area around the service's starting point. Fewer than three characters are not sent and answer with an empty list. Call it after a pause in typing, not on every keystroke, and ignore the answer to an input the guest has since changed.

lookup

const trip = await api.distance.lookup('service-uuid', { placeId, session });
const toAirport = await api.distance.lookup('service-uuid', { landmarkId: 'ord' });
FieldTypeDescription
successbooleanThe place was measured
inRangebooleanTrue: an activity is offered. False with success: measured, and too far.
distancenumberRoad distance in the service's unit, to one decimal
unit0 | 1Miles or kilometres
addressstringThe destination as one line, as it will read on the booking
mapUrlstringAn image of the route. Absent when maps are not set up.
activitystringUUID of the activity to book
tokenstringThe trip token. The library holds it for you.
messagestringWhen too far: the operator's message, if they wrote one

Only the one matched activity comes back. The service's other distances and activities are never sent.

The trip token

The activity a lookup answers with opens, goes into a cart and checks out only for a session that holds the trip.

  • Held for you. After an in-range lookup(), the library sends the token with the activity read, the cart and the checkout. A new in-range lookup replaces it.
  • One trip, one booking. The first cart sync gives the trip to that cart. From then on the cart is what holds it.
  • Let go for you. After a booking, and when the server answers that the trip is gone: cart errorCode 31 (DistanceResultRequired) or checkout action: 'distance'. Both mean: start again from the address.
  • Across page loads. Carry it yourself:
// before leaving the page
sessionStorage.setItem('trip', api.getDistanceResult() ?? '');

// on the next page, after initialize()
api.setDistanceResult(sessionStorage.getItem('trip') || null);

A token no cart has taken stops working an hour after its lookup.

What differs from an ordinary activity

  • It is not in activities. It is reached through its service only. Read without a trip, getActivity() answers success: false, and distanceService names the service when this visitor may use it.
  • The drop-off question is not asked. The activity comes without its address question. Checkout writes that answer from the trip, whatever your request sends for it.
  • Restoring a cart. After api.cart.recoverCart(key), that session has the cart and no token. Name the cart on the read: api.activity.getActivity(uuid, { cartKey: response.cartId }). The answer carries the trip's address as distanceDropOff.
  • Paying an invoice. Read the activity of an invoice's booking with api.activity.getActivity(invoice.activity, { invoice: invoiceUuid }).

Google's conditions

Suggestions, distances and the route image come from Google through the server. On your own address step:

  • Show "Powered by Google" with the suggestions.
  • Use one session (newSession()) for a search and the lookup that follows it, and a new one for the next address.
  • Do not store distance. Show it, and nothing more. The booking keeps the address.
  • Load mapUrl as it is, from Google. Do not copy or cache the image.
  • Searches and lookups are rate limited per visitor.

Full Example: Browse to Book

This example walks through the complete read-side flow: list activities, check the calendar, get time slots, and discover add-ons.

const api = new ResytechApi({ debug: true });

// 1. Initialize and get available activities
const init = await api.initialization.initialize({
  identifier: 'booking-session'
});

if (!init.success) {
  console.error('Init failed:', init.message);
  return;
}

const activities = init.activities;
console.log(`Found ${activities.length} activities`);

// 2. Get full details for the first activity
const activityUuid = activities[0].uuid;
const activityResult = await api.activity.getActivity(activityUuid);
const activity = activityResult.activity;

console.log(`${activity.name} - ${activity.durations.length} durations available`);
console.log(`Equipment: ${activity.equipment.map(e => e.name).join(', ')}`);

// 3. Check calendar for next month
const now = new Date();
const nextMonth = now.getMonth() + 2; // getMonth() is 0-indexed, API is 1-indexed
const year = nextMonth > 12 ? now.getFullYear() + 1 : now.getFullYear();
const month = nextMonth > 12 ? 1 : nextMonth;

const calendar = await api.calendar.getActivityCalendar({
  activity: activityUuid,
  month: month,
  year: year,
  includePrices: true,
  duration: activity.durations[0]?.uuid
});

if (!calendar.success) {
  console.error('Calendar failed:', calendar.message);
  return;
}

// Find the first available date
const availableDay = calendar.calendar.days.find(d => d.isAvailable);
if (!availableDay) {
  console.log('No availability this month');
  return;
}

console.log(`First available: ${availableDay.date} at $${availableDay.price}`);

// 4. Get time slots for that date
const slots = await api.timeslots.getActivityTimeSlots({
  activity: activityUuid,
  date: availableDay.date,
  duration: activity.durations[0]?.uuid
});

if (!slots.success || !slots.timeSlots?.length) {
  console.log('No slots available');
  return;
}

console.log(`${slots.timeSlots.length} time slots available`);
const firstSlot = slots.timeSlots[0];
console.log(`First slot: $${firstSlot.price}, ${firstSlot.remainingSeats} seats`);

// 5. Check for eligible add-ons
const addons = await api.addon.getEligibleAddons({
  activity: activityUuid,
  date: availableDay.date,
  time: '10:00',
  duration: activity.durations[0]?.uuid
});

if (addons.success && addons.addons?.length) {
  console.log('Available add-ons:');
  addons.addons.forEach(a => console.log(`  ${a.name}: $${a.price}`));
}

// Ready to build a cart! See the Cart & Checkout guide.

On this page