REST /api/v1/approval-notifications 8 endpoints
GET /api/v1/approval-notifications/api/v1/approval-notifications

List notifications for a user or claim

Public

Response Example

{
  "data": [
    {
      "notification_id": "notif_8h9i0j1k",
      "claim_id": "clm_9f2a3b4c",
      "recipient_user_id": "usr_84cd12ef",
      "new_status": "approved",
      "comment": "All receipts verified.",
      "read": false,
      "sent_at": "2026-03-21T11:30:05Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 7
  }
}
GET /api/v1/approval-notifications/api/v1/approval-notifications/:notification_id

Get notification with full payload

Public

Response Example

{
  "notification_id": "notif_8h9i0j1k",
  "claim_id": "clm_9f2a3b4c",
  "recipient_user_id": "usr_84cd12ef",
  "new_status": "approved",
  "comment": "All receipts verified.",
  "payload": {
    "title": "Expense claim approved",
    "body": "Your expense claim for 4850.00 NOK has been approved.",
    "action_url": "/claims/clm_9f2a3b4c",
    "action_label": "View claim",
    "severity": "success"
  },
  "read": false,
  "sent_at": "2026-03-21T11:30:05Z"
}
POST /api/v1/approval-notifications/api/v1/approval-notifications

Send a status-change notification (notifyStatusChange)

Public

Request Example

{
  "claim_id": "clm_9f2a3b4c",
  "new_status": "approved",
  "recipient_user_id": "usr_84cd12ef",
  "comment": "All receipts verified."
}

Response Example

{
  "notification_id": "notif_8h9i0j1k",
  "claim_id": "clm_9f2a3b4c",
  "recipient_user_id": "usr_84cd12ef",
  "new_status": "approved",
  "sent_at": "2026-03-26T08:10:00Z"
}
PUT /api/v1/approval-notifications/api/v1/approval-notifications/:notification_id

Mark notification as read

Public

Request Example

{
  "read": true
}

Response Example

{
  "notification_id": "notif_8h9i0j1k",
  "read": true,
  "updated_at": "2026-03-26T08:15:00Z"
}
DELETE /api/v1/approval-notifications/api/v1/approval-notifications/:notification_id

Delete a notification

Public

Response Example

{
  "deleted": true,
  "notification_id": "notif_8h9i0j1k"
}
POST /api/v1/approval-notifications/api/v1/approval-notifications/subscriptions

Subscribe to claim status events (subscribeToClaimEvents)

Public

Request Example

{
  "claim_id": "clm_9f2a3b4c",
  "user_id": "usr_84cd12ef",
  "webhook_url": "https://client.example.com/webhooks/claim-events"
}

Response Example

{
  "subscription_id": "sub_p1q2r3s4",
  "claim_id": "clm_9f2a3b4c",
  "user_id": "usr_84cd12ef",
  "active": true,
  "created_at": "2026-03-26T08:00:00Z"
}
DELETE /api/v1/approval-notifications/api/v1/approval-notifications/subscriptions/:subscription_id

Unsubscribe from claim events (unsubscribeFromClaimEvents)

Public

Response Example

{
  "unsubscribed": true,
  "subscription_id": "sub_p1q2r3s4"
}
POST /api/v1/approval-notifications/api/v1/approval-notifications/payload

Build and preview a notification payload (buildNotificationPayload)

Public

Request Example

{
  "status": "rejected",
  "comment": "Missing receipt for hotel stay."
}

Response Example

{
  "title": "Expense claim rejected",
  "body": "Your expense claim has been rejected. Reason: Missing receipt for hotel stay.",
  "action_url": "/claims",
  "action_label": "View claims",
  "severity": "warning"
}

Additional Metadata

{
  "contract_summary": {
    "total_contracts": 410,
    "total_endpoints": 2416,
    "api_styles_used": [
      "rest"
    ]
  },
  "generated_at": "2026-03-26T06:55:53.316Z"
}