Updating and Retrieving Location Hours

Retrieving Location Hours

Hours for a location can be viewed in the response when calling the Retrieve a location endpoint.

Recurring Hours

The hours object contains the general recurring business hours for the location.

hours: {
    fri: { periods: [ { from: '09:00', to: '18:00' } ], isOpen: true },
    tue: { isOpen: true, periods: [ { from: '09:00', to: '18:00' } ] },
    sun: { isOpen: false, periods: [ { from: '09:00', to: '18:00' } ] },
    mon: { periods: [ { from: '09:00', to: '18:00' } ], isOpen: true },
    thu: { periods: [ { to: '18:00', from: '09:00' } ], isOpen: true },
    sat: { periods: [ { to: '18:00', from: '09:00' } ], isOpen: false },
    wed: { isOpen: true, periods: [ { from: '09:00', to: '18:00' } ] }
  }
  • When isOpen is set to false, then the location is closed for that day (even if a timeframe is given for periods).
  • If no hours are listed in the response, or hours are set to null, then hours are considered to be 24/7.

Specific recurring hours can also be set for the Waitlist (waitlistHours) or Bookings (bookingHours), and will follow the same structure as show above for hours. If waitlistHours and/or bookingHours are not present in the Location response, then it can be assumed that none have been set and that the Waitlist and Bookings are going by regular business hours.

Hours by Date

Additionally, special hours can be set for specified calendar days, either for for general location hours, Bookings, or the Waitlist:

hoursByDate - special hours set for specific calendar dates, which will override regular general business hours for those specific calendar days
waitlistHoursByDate - special hours set for specific calendar dates, which will override regular waitlistHours (and general business hours) for those specific calendar days
bookingHoursByDate - special hours set for specific calendar dates, which will override regular bookingHours (and general business hours) for those specific calendar days

Each date with special hours set will be its own object, leading with the date in YYYYMMDD format (See examples below)

hoursByDate: {
    '20230307': { periods: [ { from: '12:00', to: '16:00' } ], isOpen: true },
    '20230308': { isOpen: false, periods: [] },
    '20230309': { periods: [ { from: '09:00', to: '18:00' } ], isOpen: true },
    '20230310': { isOpen: true, periods: [ { to: '18:00', from: '09:00' } ] }
  },
  waitlistHoursByDate: {
    '20230307': { periods: [], isOpen: false },
    '20230310': { periods: [ { from: '11:00', to: '13:00' } ], isOpen: true }
  },
  bookingHoursByDate: {
    '20230309': { isOpen: false, periods: [] },
    '20230310': { periods: [ { to: '13:00', from: '11:00' } ], isOpen: true }
  }

Updating Location Hours

Hours can be updated for a location by making a POST call to the Update Location endpoint with a request payload containing the respective hours object(s) to be set (ie. hours, waitlistHours, bookingHours, hoursByDate, etc). The request payload should look very similar to the response payloads in the above section.

{
  "hours": {
    "mon": { "isOpen": true, "periods": [ { "from": "09:00", "to": "18:00" } ] },
    "tue": { "isOpen": true, "periods": [ { "from": "09:00", "to": "18:00" } ] },
    "wed": { "isOpen": true, "periods": [ { "from": "09:00", "to": "18:00" } ] },
    "thu": { "isOpen": true, "periods": [ { "from": "09:00", "to": "18:00" } ] },
    "fri": { "isOpen": true, "periods": [ { "from": "09:00", "to": "18:00" } ] },
    "sat": { "isOpen": false },
    "sun": { "isOpen": false }
  }
}

The same formatting as above can be used when setting waitlistHours and bookingHours.

{
    "hoursByDate": {
    "20230407": { "periods": [ { "from": "12:00", "to": "16:00" } ], "isOpen": true },
    "20230408": { "isOpen": false }
  }
}

The same formatting as above can be used when setting waitlistHoursByDate and bookingHoursByDate.