API Reference

Notifications

Configure notification channels (email, SMS, webhook), subscribe to POS events, review delivery logs, and send test messages. Keep your team informed about new orders, low stock, shift changes, and more.

Get Notification Settings

Retrieve all configured notification rules for the restaurant.

GET/api/notifications/settingsAdmin Only

Returns an array of all notification subscription rules.

bash
curl https://api.possfer.com/api/notifications/settings \
  -H "Authorization: Bearer <token>"
json
{
  __PH1__: [
    {
      __PH2__: "ns-a1b2c3d4-5678-90ab-cdef-777777777777",
      __PH4__: "email",
      __PH6__: "new_order",
      __PH8__: true,
      __PH9__: "kitchen@restaurant.de",
      __PH11__: "2026-01-10T09:00:00Z",
      __PH13__: "2026-01-10T09:00:00Z"
    },
    {
      __PH15__: "ns-b2c3d4e5-6789-01ab-cdef-888888888888",
      __PH17__: "webhook",
      __PH19__: "payment_received",
      __PH21__: true,
      __PH22__: "https:__PH0__
      "created_at": "2026-02-01T12:__PH28__:00Z",
      "updated_at": "2026-02-01T12:__PH30__:00Z"
    }
  ]
}

Create Notification Setting

Subscribe a channel to a specific POS event type.

POST/api/notifications/settingsAdmin Only

Creates a new notification subscription rule.

Request Body

NameTypeRequiredDescription
channel"email" | "sms" | "webhook"RequiredDelivery channel for the notification.
event_typestringRequiredPOS event to subscribe to. Examples: "new_order", "payment_received", "low_stock", "shift_change", "daily_report".
is_enabledbooleanRequiredWhether this rule is active. Set to false to create it in a disabled state.
destinationstringRequiredTarget address: email address, phone number (E.164 format), or webhook URL.
bash
curl -X POST https://api.possfer.com/api/notifications/settings \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "channel": "email",
    "event_type": "daily_report",
    "is_enabled": true,
    "destination": "owner@restaurant.de"
  }'
json
{
  __PH0__: {
    __PH1__: "ns-c3d4e5f6-7890-12ab-cdef-999999999999",
    __PH3__: "email",
    __PH5__: "daily_report",
    __PH7__: true,
    __PH8__: "owner@restaurant.de",
    __PH10__: "2026-03-20T10:00:00Z",
    __PH12__: "2026-03-20T10:00:00Z"
  }
}

Delete Notification Setting

Remove a notification subscription. The rule is permanently deleted.

DELETE/api/notifications/settings/:idAdmin Only

Deletes the notification rule and returns 204 No Content on success.

Path Parameters

NameTypeRequiredDescription
idstring (UUID)RequiredUnique identifier of the notification setting.
bash
curl -X DELETE https://api.possfer.com/api/notifications/settings/ns-a1b2c3d4-5678-90ab-cdef-777777777777 \
  -H "Authorization: Bearer <token>"

Notification Logs

View the delivery log for recent notifications. Useful for debugging delivery issues or confirming that notifications are being sent.

GET/api/notifications/logsAdmin Only

Returns recent notification delivery logs, ordered by most recent first.

Query Parameters

NameTypeRequiredDescription
limitintegerOptionalMaximum number of log entries to return. Defaults to 50, max 200.
bash
curl __PH1__Authorization: Bearer <token>"
json
{
  __PH2__: [
    {
      __PH3__: "nl-11223344-5566-7788-99aa-bbccddeeff00",
      __PH5__: "ns-a1b2c3d4-5678-90ab-cdef-777777777777",
      __PH7__: "email",
      __PH9__: "new_order",
      __PH11__: "kitchen@restaurant.de",
      __PH13__: "delivered",
      __PH15__: null,
      __PH16__: "New order __PH0__
      "sent_at": "2026-03-20T12:__PH37__:00Z"
    },
    {
      "id": "nl-22334455-6677-8899-aabb-ccddeeff0011",
      "setting_id": "ns-b2c3d4e5-6789-01ab-cdef-888888888888__PH23__channel__PH24__webhook__PH25__event_type__PH26__payment_received__PH27__destination__PH28__https://hooks.example.com/possfer",
      __PH29__: "failed",
      __PH31__: "HTTP 503 - Service Unavailable",
      __PH33__: null,
      __PH34__: "2026-03-20T11:45:00Z"
    }
  ]
}

Send Test Notification

Send a test message to a specific channel and destination. Use this to verify that your email, SMS, or webhook configuration is working correctly before enabling it for production events.

POST/api/notifications/testAdmin Only

Sends a test notification and returns the delivery result.

Request Body

NameTypeRequiredDescription
channel"email" | "sms" | "webhook"RequiredDelivery channel to test.
destinationstringRequiredTarget address: email, phone number (E.164), or webhook URL.
bash
curl -X POST https://api.possfer.com/api/notifications/test \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "channel": "webhook",
    "destination": "https:__PH1__
  }'
json
{
  __PH1__: true,
  __PH2__: "webhook",
  __PH4__: "https:__PH0__
  "message": "Test notification delivered successfully.",
  "sent_at": "2026-03-20T14:__PH10__:00Z"
}