Placewise API
Get startedExplore
Get startedExplore
Performance Cloud 🗗
Placewise 🗗
  1. Common Models
  • Introduction
  • Global Headers
  • Common HTTP Error Codes
  • API Permits
  • Rate Limiting
  • Authorization
    • Token Authorization
    • Member Authorization
    • User Authorization
  • API Contexts
    • Customer Context
    • LoyaltyClub Context
    • Global Context
  • Common Concepts
    • Localization
    • System URLs
    • Params Validation
    • Pagination
    • Sorting
  • Common Models
    • Common Data Formats
    • Member Model
    • API Entity Model
    • Opening Hours Model
  1. Common Models

Opening Hours Model

Opening hours of some MPC entities are represented by arrays of items (OpeningHoursItem) where each defines entity's working hours for given day.

Model#

OpeningHoursItem

Items with weekday type specify regular working hours for each day of the week (API always returns at least one item for each week day).
Valid period values for this type are: monday, tuesday, wednesday, thursday, friday, saturday, sunday.
Items with type day specify special working hours for specific day (period has YYYY-MM-DD format) that override regular ones.
Any day may have opening time defined in multiple periods (hours do not overlap).
For instance, in attached example, on tuesday the entity is open in two periods:
10:00-15:00 and 16:00-18:00 with a one hour break between them.
Items returned from API are sorted in following order:
1
type ASC (weekday < day)
2
period ASC (chronological order)
3
hours.opens_at ASC (chronological order)

Example#

Array of OpeningHoursItem for some object:

[
  { "type": "weekday", "period": "monday", "hours": { "opens_at": "10:00", "closes_at": "18:00" } },
  { "type": "weekday", "period": "tuesday", "hours": { "opens_at": "10:00", "closes_at": "15:00" } },
  { "type": "weekday", "period": "tuesday", "hours": { "opens_at": "16:00", "closes_at": "18:00" } },
  { "type": "weekday", "period": "wednesday", "hours": { "opens_at": "10:00", "closes_at": "18:00" } },
  { "type": "weekday", "period": "thursday", "hours": { "opens_at": "10:00", "closes_at": "18:00" } },
  { "type": "weekday", "period": "friday", "hours": {"opens_at": "10:00", "closes_at": "18:00" } },
  { "type": "weekday", "period": "saturday", "hours": { "opens_at": "12:00", "closes_at": "15:00" } },
  { "type": "weekday", "period": "sunday", "hours": null },
  { "type": "day", "period": "2023-05-01", "hours": null },
  { "type": "day", "period": "2023-12-22", "hours": { "opens_at": "12:00", "closes_at": "14:00" } },
  { "type": "day", "period": "2023-12-25", "hours": null, "description": { "en": "Christmas", "no": "Jul"} }
]
Previous
API Entity Model
Built with