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
| Field | Type | Description |
|---|---|---|
Accept-Languageoptional | String | =en-GB Language use for localization. |
X-Clientoptional | String | =Client type. "Portal""Mobile""Admin" |
X-Roleoptional | Number | ProMark role (1: Employee, 2: User). {12} |
X-WebPart-Idoptional | Number | Unique web-part identifier. |
Parameter
| Field | Type | Description |
|---|---|---|
| request | Object | Main object containing the request data. |
| data | Object | Object containg data to be uploaded. |
| messages | Object[] | Collection of message. |
| employees | Object[] | Collection of employees to whom message will be send. |
| id | Number | Employee identifier. |
| sender | Number | Message sender type. Possible values are 0 = ProMark and 1 = USER 01 |
| text | String | Message text |
| type | Number | Notification type, possible values are 0 = ALL, 1 = SMS, 2 = Notification 012 |
Request example for message send:
{"request": {"data": {"messages": [{"sender": 0,"type": 0,"text": "Message text","employees": [{"id": "1060"},{"id": "706"}]}]}}}
Error 4xx
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
| data | Object | Object containing the requested data (empty). |
| errorCode | Number | Error code. |
| errorMessage | String | Error description. |