General - Send message

API Url

Used for sending message as SMS or notification to employees.

POST
http://localhost:16010/ProMarkREST/rest/General/messages

Permissions: user

Request headers

FieldTypeDescription
Accept-LanguageoptionalString

=en-GB Language use for localization.

X-ClientoptionalString

=Client type.

Allowed values:"Portal""Mobile""Admin"
X-RoleoptionalNumber

ProMark role (1: Employee, 2: User).

Allowed values:{12}
X-WebPart-IdoptionalNumber

Unique web-part identifier.

Parameter

FieldTypeDescription
requestObject

Main object containing the request data.

  dataObject

Object containg data to be uploaded.

    messagesObject[]

Collection of message.

      employeesObject[]

Collection of employees to whom message will be send.

        idNumber

Employee identifier.

      senderNumber

Message sender type. Possible values are 0 = ProMark and 1 = USER

Allowed values:01
      textString

Message text

      typeNumber

Notification type, possible values are 0 = ALL, 1 = SMS, 2 = Notification

Allowed values:012

Request example for message send:

{
"request": {
"data": {
"messages": [
{
"sender": 0,
"type": 0,
"text": "Message text",
"employees": [
{
"id": "1060"
},
{
"id": "706"
}
]
}
]
}
}
}

Error 4xx

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data (empty).

  errorCodeNumber

Error code.

  errorMessageString

Error description.