v1

latestOpenAPI 3.0.02026-07-1398671635.1 KB
Restaurant Events
publicly-accessible

Create Offline Event

Creates an event for the specified restaurants that indicates a reason for those restaurants to be offline.

post/v1/{tenant}/restaurants/event/offline

Path parameters

tenantstring required

The identifier for the tenant

Headers

X-JE-Requesterstring required

Name of the user or system creating the event. Used for auditing purposes

X-JE-User-Role'System' | 'Operations' | 'Restaurant' required
  • System : Role for an automated process action.
  • Operations : Role for an operations user action.
  • Restaurant : Role for a restaurant owner/employee user action.

Request body

restaurantIdsstring required

A comma separated list of the IDs of the restaurants to include in the offline event. No limit to the number accepted by the endpoint, but unexpected behaviour mat occur at more than 500 IDs.

namestring required

Name of the offline event to be created.

reasonstring required

The reason for creating the offline event.

startDatestring date-time required

ISO 8601 format of the start datetime of the offline event.

endDatestring date-time nullable

ISO 8601 format of the end datetime of the offline event.

durationstring

Either a timespan in the HH:mm format or untilTomorrow (this will be the next day at 4:30 am +/- 10 minutes local time). Note if both duration and endDate are specified duration takes precedence.

allowRestaurantOverrideboolean required

Whether a restaurant should be allowed to delete this event, regardless of who raised it.

legacyTempOfflineType'Unset' | 'None' | 'TempOffline' | 'ClosedToday' | 'ClosedDueToEvent' | 'FailedJctConnection' | 'NoTrOverride' | 'IgnoredOrders'
  • Unset : Legacy value meaning online.
  • None : Legacy value meaning online.
  • TempOffline : The restaurant will go temporarily offline, typically for an undetermined amount of time (no end date).
  • ClosedToday : The restaurant will closed for the day and the event will end the next morning.
  • ClosedDueToEvent : The restaurant will go offline for an event (e.g. a holiday), these events will typically have an end time.
  • FailedJctConnection : The restaurant will go offline due to the POS device losing connection.
  • NoTrOverride : The restaurant will go offline for another reason that the restaurant cannot override.
  • IgnoredOrders : The restaurant will go offline due to ignoring orders.
categorystring

A free text category used to group multiple events. This field is not intended to be used by clients.

Example request

{
  "restaurantIds": "12345",
  "name": "Out of Chicken",
  "reason": "No more chicken in stock.",
  "startDate": "2020-01-16T09:00:00Z",
  "duration": "1:00:00",
  "allowRestaurantOverride": true
}

Response

Created

restaurantEventIdstring

The ID of the offline event created

restaurantIdsstring

A CSV of the restaurant IDs added to the offline event

Example response

{
  "restaurantIds": "12345",
  "restaurantEventId": "03bff206-d136-405f-b789-95190e9711a4"
}