Hours

Used to define general hours of operation for a Product. This does not need to match the ticket availability and is only intended for informal use.

X-Capabilities: redeam/hours

Hour Object

Each Hour object contains three required parameters (daysOfWeek, times, valid) and one optional parameter (exclusionDates).

times contains a list of time ranges (specified in 24-hour HH:MM format, local to the Product's Timezone) when the Product Option is open for business. This can be a single range (such as nine to five, 09:00 - 17:00) or multiple ranges (nine to noon & one to five, 09:00 - 12:00 , 13:00 - 17:00).

daysOfWeek contains an array of numbers 0 - 6 (representing Sunday and Saturday, respectively) on which the provided times are valid. For example, a daysOfWeek of [1, 3, 5] indicates that the times in the Hour are only valid on Mondays, Wednesdays and Fridays.

valid indicates a time range between two RFC3339 timestamps during which the Hour is considered authoritative.

Tip

Past or upcoming Hours which are not yet within their valid range may be excluded from the API response to manage large Hour sets.

Although it is possible to encode closed times in-between open Hour ranges, the excludeDates parameter has been provided to simplify this task. Single or recurring exclusion dates may be added to this array of strings by specifying a date without a year (MM-DD) or a full date (YYYY-MM-DD). Exclusion dates are always interpreted within the Product's Timezone.

Field Name

Type

Required

Description

exclusionDates

array[string]

No

Dates on which these Hours do not apply (either MM-DD or YYYY-MM-DD)

daysOfWeek

array[integer]

Yes

Numeric day of the week; 0 = Sunday; 6 = Saturday,

times

array[Time]

Yes

Available hours of operation

valid

Valid

Yes

The time range this object is valid for

Time Object

Used in the Hour object times array. Represents an inclusive range of local time that a tour or attraction is open for business.

Field Name

Type

Required

Description

open

string

Yes

Local start time (HH:MM format)

close

string

Yes

Local end time (HH:MM format)

Valid Object

Contains an inclusive time range starting at from and ending at until.

Field Name

Type

Required

Description

from

string(RFC3339)

Yes

Start of validity window, inclusive

until

string(RFC3339)

Yes

End of validity window, inclusive

GET /suppliers/:supplierId/products

Adds an hours array to a Product's options.

Example #1

ProductOption with hours open 7 days a week, year-round, with the same hours

{ "id": "e6568c90-59f5-4592-96a8-382b976b21fb", // .. Rest of the Product object "options": [ { "id": "a21fd74e-0e5c-43c9-99fc-192aa2d94041", // .. Rest of the ProductOption object "hours": [ { "exclusionDates": [], "daysOfWeek": [ 0, 1, 2, 3, 4, 5, 6 ], "times": [ { "open": "08:00", "close": "17:00" } ], "valid": { "from": "2020-01-01T00:00:00Z", "until": "2020-12-31T23:59:59Z" } } ] } ] }

Example #2

Product option open 7 days a week from 8 AM to 5 PM local time, excluding US Independence day and Christmas day every year, and Halloween 2020. Hours valid for all of year 2020.

{ "id": "e6568c90-59f5-4592-96a8-382b976b21fb", // .. Rest of the Product object "options": [ { "id": "a21fd74e-0e5c-43c9-99fc-192aa2d94041", // .. Rest of the ProductOption object "hours": [ { "exclusionDates": [ "12-25", "7-4", "2020-10-31" ], "daysOfWeek": [ 0, 1, 2, 3, 4, 5, 6 ], "times": [ { "open": "08:00", "close": "17:00" } ], "valid": { "from": "2020-01-01T00:00:00Z", "until": "2020-12-31T23:59:59Z" } } ] } ] }

Example #3

Product option is open 7 days a week, with varying operating hours. Exclusion dates carved out for US Independence day, Christmas day, and Halloween 2020.

{ "id": "e6568c90-59f5-4592-96a8-382b976b21fb", // .. Rest of the Product object "options": [ { "id": "a21fd74e-0e5c-43c9-99fc-192aa2d94041", // .. Rest of the ProductOption object "hours": [ { "exclusionDates": [ "12-25", "7-4", "2020-10-31" ], "daysOfWeek": [ 0, 1, 2, 3 ], "times": [ { "open": "09:00", "close": "17:00" } ], "valid": { "from": "2020-01-01T00:00:00Z", "until": "2020-12-31T23:59:59Z" } }, { "exclusionDates": [ "12-25", "7-4", "2020-10-31" ], "daysOfWeek": [ 4, 5 ], "times": [ { "open": "08:00", "close": "18:00" } ], "valid": { "from": "2020-01-01T00:00:00Z", "until": "2020-12-31T23:59:59Z" } }, { "exclusionDates": [ "12-25", "7-4", "2020-10-31" ], "daysOfWeek": [ 6 ], "times": [ { "open": "11:00", "close": "16:00" } ], "valid": { "from": "2020-01-01T00:00:00Z", "until": "2020-12-31T23:59:59Z" } } ] } ] }