What's New in v1.2

Version 1.2 of the Redeam Booking API introduces several improvements to enhance the functionality and usability of the API:

  • Contact object definition has been added
  • Supplier objects now contain the properties Contacts and BusinessType
  • Product objects now contain the property OtherLocations
  • Multiple properties have been deprecated in Location objects
  • Location objects now contain the property Website
  • Address objects now require the property Region to be set
  • Address objects now contain the property GooglePlaceId
  • Hours objects now contain the property Timezone
  • BookingItem objects now contain the property Id
  • BookingTraveler object property Type has been deprecated
  • BookingTicket object property BookingItemId has been changed to BookingItemIds
  • BookingTicket object property Status has been converted from an integer code to a descriptive string
  • BookingTicketGuests objects now contain the property TypeModifier
  • BookingTraveler objects now contain the property Modifier

The remainder of this document provides more detailed information describing each change and API reference links for further information.

Contact object definition

A new component object, Contact, has been introduced in version 1.2. The purpose of its introduction is to extend and consolidate all contact information for various products and suppliers. Its signature is as follows:

NameTypeRequiredValidationDescription
Emailstringyes^\w+@\w+\.\w+$Contact email address
Namestringyes.*Contact name
Phonestringyes^\+[\d\s\(\)-]+$Contact phone number
Primaryboolno.*True for primary contact
Titlestringno.*Contact title

Product.Contacts

Supplier.Contacts

Supplier objects contain Contacts and BusinessType properties

In version 1.2, we're extending the Supplier object by adding the ability for suppliers to store a list of contacts and a collection of tags/keywords that describe their business:

NameTypeRequiredValidationDescription
ContactsList<Contact>noper objectContacts is a collection of Contact objects containing prioritized contact information the supplier wishes to share.
BusinessTypeList<string>no.*BusinessType is a list of descriptive tags/keywords the supplier wishes to be used as inputs to resellers' search functionality

Supplier

Product objects contain OtherLocations property

Originally, multi-location support was limited to Supplier objects - it was envisioned that suppliers might maintain multiple places of physical presence, but Product objects were only allocated one Location property because they were presumed to need only the location to which guests report in order to redeem their Booking.

Use cases have emerged where this presumption does not apply (multi-museum tickets, for example). In order to support these use cases, version 1.2 adds the OtherLocations property:

NameTypeRequiredValidationDescription
OtherLocationsList<Location>noper objectOtherLocations is a collection of Location objects containing any supplemental product-specific location data the operator wishes to share.

Product

Multiple Location object properties deprecated

Several properties in the Location object have been deprecated in version 1.2 and superseded with properties that are more capable or are in more logical locations. All properties are type string; no validations are performed unless noted.

PropertySuperseded ByValidation (new)Remark
Location.CityAddress.Locality.*Locality is usually the address city, but can be used for other data in locations or circumstances where the tag City may not be applicable.
Location.CountryAddress.CountryCode^[A-Za-z]{3}$CountryCode represents the same data as those that were stored in Country, but with the additional constraint of being encoded in ISO 3366-1 alpha-3 format.
Location.StateAddress.Region.*Region is usually a state/province, but can be used for other data in locations or circumstances where the tag State may not be applicable.
Location.UtcOffsetHours.TimezoneIANA Time ZoneUtcOffset is limited in capability due to the fact that many locales observe summer time/DST and this value may change throughout the year. The replacement field, Timezone, accounts for this and is now located with other temporal data in the Hours object. See Timezone section below for more information.

Product.Location

Product.OtherLocations[id]

Supplier.MainLocation

Supplier.OtherLocations[id]

Location objects contain Website property

In addition to the changes listed above, the Location object has also been extended with the inclusion of a Website property. This property is intended to store the URL to be used by guests or other interested parties to retrieve information about the supplier or product represented by the Location's parent object.

NameTypeRequiredValidationDescription
WebsitestringnoRFC-3986Website is a URL locating a resource relevant to the parent object.

Product.Location

Product.OtherLocations[id]

Supplier.MainLocation

Supplier.OtherLocations[id]

Address objects require Region property

Due to the deprecation of the Location.State property, the corresponding property Address.Region is now required. See above for more information.

Product.Location.Address

Product.OtherLocations[id].Address

Supplier.MainLocation.Address

Supplier.OtherLocations[id].Address

Address objects contain GooglePlaceId property

Google has established and populated a vast database of information on various buildings, areas, and places of interest. In order to leverage their work and better integrate with their Reserve with Google services, we've added a property to the Address object in which to store a reference key to their placeId database.

NameTypeRequiredValidationDescription
GooglePlaceIdstringnoby GoogleGooglePlaceId is a unique key identifying a place or location of interest in Google's Places API.

Product.Location.Address

Product.OtherLocations[id].Address

Supplier.MainLocation.Address

Supplier.OtherLocations[id].Address

Hours objects contain Timezone property

UTC can be an easy way to compare times globally, but the world works in local time. Jurisdictional differences in the observance of summer time/DST can make the creation and interpretation of rates and prices very confusing if only UTC time data are provided.

Consider a situation where an operator in a location that observes summer time needs to create a new Rate - the operator would take the applicable times, mutate them using the UTC offset when the rate is added, and use them to create the Rate. In this situation, resellers must use the creation date from the Rate object and the location from the Product or Supplier object to determine the local time data (presuming the location is provided and accurate - it is not required). This situation could be mitigated in previous versions of the API, but doing so required operators to create an new set of Rate objects for each local time change.

To rectify this situation, Redeam has added an optional Timezone field to the Hours object. The inclusion of this field makes all local time data fully explicit and eliminates the possibility that this confusion will occur. If no value is provided, the default value of UTC results in behavior consistent with previous versions.

NameTypeRequiredValidationDescription
TimezonestringnoIANA Time ZoneTimezone is an item from the IANA Time Zone list representing the local time paradigm relevant to the parent object.

Product.Hours

Supplier.Hours

Rate.Hours

component of Booking.Items[id_] and [Hold.Items[_id]

BookingTraveler object property Type deprecated

Each BookingItem has a Traveler property (type BookingTraveler) which contains information about the guest to which the BookingItem pertains. In practice, many reservations are made with only the lead traveler's guest information provided, so the BookingTraveler object data is identical for each BookingItem, with the exception of a field used to denote the guest's age for the purpose of rate verification.

In previous versions of the API, the field Type was used for this purpose; it stored a string value representing the age band of the traveler - ADULT, CHILD, SENIOR, etc. Starting with version 1.2, the Type field is no longer used; instead, the BookingTraveler object's Age field now represents the actual age of the BookingItem guest.

This modification serves two purposes:

  • First, it alleviates the need for users of the API to use a lookup table in order to determine the exact string values to use and the ages to which they correspond.
  • Second, it allows operators to customize their rates to different age groups as they see fit instead of being forced to use fixed age bands that are quantized in a way that may not conform to their needs.

Booking.Items[id].Traveler

Booking.Tickets[id].LeadTraveler

BookingItem objects contain Id property

As originally designed, it was anticipated that access to the Items collection of a Booking object would be sufficient and that access to individual booking items would not be necessary. Use cases have since emerged where individual item access would be beneficial; consequently, each booking item now contains an Id property which is assigned a unique identifier (UUIDv4) upon creation.

NameTypeRequiredValidationDescription
Idstringn/aUUID v4Id is an automatically generated identifier unique to each BookingItem.

Booking.Items[id]

BookingTicket supports multiple BookingItem ids

In tandem with the addition of Id properties to individual BookingItem objects, BookingTicket property BookingItemId (previously intended only for internal use) has been modified for version 1.2. This property is now labeled BookingItemIds; as the name change implies, it has been repurposed to be a collection of string ids instead of a singular string. Upon object creation, this collection is populated with the Id from each BookingItem to which the ticket applies.

NameTypeRequiredValidationDescription
BookingItemIdsList<string>n/aUUID v4 (per item)BookingItemIds is a collection of automatically generated identifier unique to each BookingItem in Booking.Items.

Booking.Tickets[id]

BookingTicket status codes are descriptive strings

Previous versions of the API encoded BookingTicket property Status as an integer; starting with version 1.2, this property will be encoded as a descriptive string. A chart detailing the former integer codes and the new string values to which they correlate is presented below - the intent of this change is to allow our API users to understand the meaning of the status values without its assistance.

CodeValue
0UNKNOWN
1OPEN
2REDEEMED
3CANCELLED
4REFUNDED
5-8deprecated
9EXPIRED
10DELETED

Booking.Tickets[id]

BookingTicketGuests objects contain TypeModifier property

Previous versions of the API did not provide any way to categorize BookingTicket guest types aside from the age bands represented by the TypeCode property. Starting with version 1.2, each BookingTicketGuests object contains a property to capture this information: TypeModifier. When applicable, it can be populated with one of the enumerated values listed in the table below.

NameTypeRequiredValidationDescription
TypeModifierenumNoNONE``EU_CITIZEN``GROUP_RATE``MILITARY_RATENo special traveler type (default) Traveler is an EU citizen Traveler is member of a group with special rate Traveler is member of US military

Booking.Tickets[id].Guests[id]

BookingTraveler objects contain Modifier property

Very similar to above, previous versions of the API did not provide any way to categorize RatePrice traveler types aside from the age bands represented by the AgeBand property. Starting with version 1.2, each BookingTraveler object contains a property to capture this information: Modifier. When applicable, it can be populated with one of the enumerated values listed in the table below.

NameTypeRequiredValidationDescription
ModifierenumNoNONE``EU_CITIZEN``GROUP_RATE``MILITARY_RATENo special traveler type (default) Traveler is an EU citizen Traveler is member of a group with special rate Traveler is member of US military

Rate.Prices[id].TravelerType

Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard