LogoLogo
  • Welcome to the MOOST platform user manual
  • Platform Manual
    • Login
      • Forgot Password
    • Notifications
    • Rules
      • Rule Configurator
        • Data graph
        • Datasets
        • Condition
        • Streak
        • Message
        • Settings
        • Rule Simulator
        • Early Adopter
        • Command
      • Rule Language
        • Syntax
        • Data Types
        • Data Structures
        • Functions
          • AVG
          • COUNT
          • DISTINCT
          • EVAL
          • FILTER
          • GROUP_BY_DEVICE
          • GROUP_BY_TIME
          • MAX
          • MIN
          • POSITION
          • REVERSE
          • SORT
          • SUBSET
          • SUM
        • Operations
          • Plus
          • Minus
          • Multiply
          • Divide
          • Negate
          • Less Than
          • Less or Equal
          • Equal
          • Not Equal
          • Greater or Equal
          • Greater
          • AND
          • OR
          • NOT
          • Format
          • Attribute Accessor
        • Examples
    • Events
    • Buildings
      • Household Profile
    • User Profile
    • Billing Portal
      • Payment Method
      • Update Payment Address
      • Invoices
      • Terminate Subscription
    • Context Services
      • Weather Forecast
      • Solar Production Forecast
      • Power Consumption Forecast
      • Power Generation Forecast
    • Support Center
  • Technical Integration
    • Cloud-to-Cloud Integration
      • Platform On-boarding
      • Configure Notification Settings
        • Receive Notifications
          • iOS Notification Handling
      • MOOST API Integration
        • Request Access Token
        • Synchronize Buildings and Devices
          • Device Types
        • Forward Events
          • Event Types
            • Device Status
            • Charging Modes
            • Switch State
        • Notifications and Interactions
          • Return Notification Interaction
  • Best Practices
    • FAQ
    • User Acceptance Testing
  • Policies
    • Security Policy
    • Privacy Policy
Powered by GitBook

ยฉ 2025 MOOST AG

On this page
Export as PDF
  1. Technical Integration
  2. Cloud-to-Cloud Integration
  3. MOOST API Integration

Notifications and Interactions

PreviousSwitch StateNextReturn Notification Interaction

Last updated 10 months ago

The notifications are sent to you via the configured endpoint, see Configure Notification Settings. Nevertheless you might want to render a list of delivered notifications at a later time.

Use following MOOST API to achieve that

Set an Interaction on a delivered Notification

When the push notification is sent to a end-customer (typically to a mobile app), then this person shall have the possibility to interact to the notification. The app shall then send the interaction type with following API call:

Example with CURL

# make sure ACCESS_TOKEN is set and valid (see "Request Access Token")
curl -X POST "https://api.moost.io/pushnotifications/668b8e708f308b0123074cb7/interactions/v1" \
     -H  "Authorization: Bearer $ACCESS_TOKEN" \
     -H  "Content-Type: application/json" -d "{\"actionQualifier\":\"OPENWEB\"}"

Load Notifications of a Building

The app shall have the possibility to display the generated notifications. Following API can be used to fulfill this need.

Example with CURL

curl -X GET "https://api.moost.io/pushnotifications/buildings/99900000ECA31C6E/v1?deliveryStatus=DELIVERED" \
     -H  "Authorization: Bearer $ACCESS_TOKEN"

Get push notifications of a building

get
Authorizations
Path parameters
customerBuildingIdstringRequired

Select notifications of specified building.

Pattern: ^[a-zA-Z0-9:._-]{1,100}$
Query parameters
deliveryStatusstring ยท enumOptional

If specified, then filter for notifications with specified status.

Possible values:
Responses
200
OK
application/json
get
GET /pushnotifications/buildings/{customerBuildingId}/v1 HTTP/1.1
Host: api.moost.io
Authorization: Bearer JWT
Accept: */*
200

OK

[
  {
    "id": "text",
    "customerId": "text",
    "customerBuildingId": "text",
    "ruleId": "text",
    "priority": "high",
    "createdAtTimeMillis": 1,
    "interaction": {
      "actionQualifier": "DISMISS",
      "userId": "text"
    },
    "ingestionTimestamp": 1,
    "notification": {
      "actionQualifier": {
        "ANY_ADDITIONAL_PROPERTY": "DISMISS"
      },
      "texts": {
        "ANY_ADDITIONAL_PROPERTY": {
          "title": "text",
          "message": "text",
          "actions": {
            "ANY_ADDITIONAL_PROPERTY": {
              "text": "text",
              "parameter": "text"
            }
          }
        }
      },
      "command": "text"
    },
    "delivery_status": {
      "status": "DELIVERED",
      "reason": "text"
    },
    "userIds": [
      "text"
    ]
  }
]
  • Set an Interaction on a delivered Notification
  • POSTSave an interaction on a delivered push notification
  • Load Notifications of a Building
  • GETGet push notifications of a building

Save an interaction on a delivered push notification

post
Authorizations
Path parameters
pushNotificationIdstringRequired

Select specified notification.

Pattern: ^[a-zA-Z0-9]{24}$
Body
actionQualifierstringOptional
userIdstringOptionalPattern: ^[a-zA-Z0-9:._@-]{1,100}$
Responses
200
OK
post
POST /pushnotifications/{pushNotificationId}/interactions/v1 HTTP/1.1
Host: api.moost.io
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 42

{
  "actionQualifier": "text",
  "userId": "text"
}
200

OK

No content