Kitchen - Create New Notification
Overview
This endpoint allows you to create a kitchen notification.
Request
POST /v1/notifications/kitchen
Mandatory Request Values
Key | Type | Description | Example |
---|---|---|---|
subject | string | The subject of the notification | Order #1234 |
message | string | The message of the notification (maximum of 1000 characters) | Customer is allergic to peanuts |
priority | string | The priority of the notification, one of: 'critical', 'high', 'normal', 'low' | critical |
store_uuids | array | The store uuids to send the notification to | ["uuid1", "uuid2"] |
Optional Request Values
Key | Type | Description | Example |
---|---|---|---|
send_at | string | The time to send the notification in each store's local time. | "2024-10-08T11:00:00+07:00" |
expired_at | string | The time to expire the notification in each store's local time and must be after send_at | "2024-10-09T11:00:00+07:00" |
Notification Timing and Time Zone Handling
1. Local Time Zone Consideration
- Notifications are scheduled and sent according to each store's local time zone.
2. Notification Scheduling
- The
send_at
parameter determines when notifications are sent. - If empty it will send the notification immediately.
- Format: ISO 8601 (e.g., "2024-10-08T11:00:00+07:00")
- The
expired_at
parameter determines when notifications are expired. - If empty it will not expire the notification until manually marked as expired on the Manager Portal.
3. Example Scenario
If send_at
is set to "2024-10-08T11:00:00+07:00"
- All stores will receive the notification at 11:00 AM on October 8th, 2024, in their respective local time zones.
4. Immediate Sending for Past Times
- If the specified time has already passed in a store's time zone when the notification is created, the system will send the notification immediately to that store.
Example Request
POST /v1/notifications/kitchen
{
"subject": "Order #1234",
"message": "Customer is allergic to peanuts",
"priority": "critical",
"store_uuids": ["uuid1", "uuid2"],
"send_at": "2024-10-08T11:00:00+07:00",
"expired_at": "2024-10-09T11:00:00+07:00"
}
Example Response
{
"batch_uuid": "cf90eabff6b1ad3f91a62e007f50976a"
}