Skip to content

staff.notifications ​

1 method on staff.notifications. Each returns the answer's data and throws NoviqaError on a failed answer.

create ​

POST/admin/v1/notifications

Send a notification to terminals

Sends a text message to the terminals of the accounts in logins: a comma separated list of logins and ranges ("1001, 1005-1010"), at most 1000 logins, repeats sent once. message is required, 1-1024 characters after trimming. Each message is stored (signed with the account group's company) so the terminal lists it later, then pushed to open terminals as a notification event. Each login is handled on its own: one out of scope or unknown gets sent false with its code. One journal line.

More details

Rights: the staff member needs every one of: notifications.

Request body
loginsstring
comma separated logins and ranges, e.g. "1001, 1005-1010"
messagestring
the text, 1-1024 characters
Returns
Promise<NotificationResult[]>
The answer's data.
Errors
400invalid_input: invalid input
401auth.session_expired: session expired, sign in again
403auth.csrf_invalid: request refused: reload the page and try again
403auth.invalid_terminal: this terminal cannot be used here
403auth.otp_enrol_required: your group requires one-time codes: set them up to continue
403auth.password_change_required: you must change your password first
403forbidden: you do not have access to this action
500internal: something went wrong
ts
import { staff } from "@/lib/noviqa"

const data = await staff.notifications.create({
  logins: "100234, 100240-100245",
  message: "Trading hours change on Friday."
})
bash
curl -X POST "$NOVIQA_API_URL/admin/v1/notifications" \
  -H "Authorization: Bearer $NOVIQA_TOKEN" \
  -H "Content-Type: application/json" \
  --data-raw '{
  "logins": "100234, 100240-100245",
  "message": "Trading hours change on Friday."
}'
json
{
  "success": true,
  "code": "ok",
  "message": "done",
  "data": [
    {
      "code": "ok",
      "id": 1,
      "login": 1001,
      "message": "string",
      "sent": true
    }
  ],
  "request_id": "5b7f2c1e"
}
ts
staff.notifications.create(body: http.docTradingNotify, options?: RequestOptions): Promise<account.NotificationResult[]>