Skip to content

Update Alerts

Update the specified alerts. If clearedAt is specified, isCleared will be set to true. If isCleared is set to true and clearedAt is null or not present, it will be set to the UTC server time that this request is processed.

Only clearedAt, isCleared, and message will be updated. Alerts cannot be uncleared.

Verb PATCH
Endpoint {base-url}/alerts
Max Page Size N/A

Request Body

{
  "body": [
    {
      "id": 36579,
      "accountId": 161,
      "siteId": 477,
      "machineLocation": "Lunchroom - Soda",
      "machineProse": null,
      "machineId": 1402,
      "code": "NS",
      "message": "No Sales have been reported by this machine for at least 3 day(s).",
      "isCleared": false,
      "clearedAt": null,
      "raisedAt": "2021-03-29T15:56:41.677"
    }
  ]
}

Returns

On Success

Returns the updated alerts.

Response Body

[
  {
    "id": 36579,
    "accountId": 161,
    "siteId": 477,
    "machineLocation": "Lunchroom - Soda",
    "machineProse": null,
    "machineId": 1402,
    "code": "NS",
    "message": "No Sales have been reported by this machine for at least 3 day(s).",
    "isCleared": false,
    "clearedAt": null,
    "raisedAt": "2021-03-29T15:56:41.677"
  }
]