Bulletins - Insert a bulletin board.
API Url
Use it for inserting a bulletin board.
http://localhost:16010/ProMarkREST/rest/Bulletins/bulletins
Permissions: user
Parameter
| Field | Type | Description |
|---|---|---|
| request | Object | Main object containing the request data. |
| data | Object | Object containg data to be uploaded. |
| bulletins | Object[] | Collection of bulletins. |
| body | String | The content of the bulletin. |
| context | Object[] | Collection of data about departments/groups. |
| id | String | The id of department/group. |
| draft | Logical | True = the bulletin is just a draft. |
| from | Date | From when the bulletin is active. |
| preview | String | A part of the bulletin. |
| title | String | The title of the bulletin |
| to | Date | End date |
| type | Integer | To whom the bulletin is addressed(0=Default, 1=Company, 2=Department, 3=Group). |
Request example:
{"request": {"data": {"bulletins": [{"title":" Bulletin 1","type":2,"from": "2019-01-01","to": "2019-05-12","draft": false,"preview":"The...","body": "The first bulletin....","context":[{"id": "MFA_AND"}]}]}}}
Success 200
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
| data | Object | Object containing the requested data. |
| bulletins | Object[] | Collection of bulletins. |
| body | String | The content of the bulletin. |
| changed | Date | The date when the bulletin was last time changed. |
| changedBy | String | The id of the user who last changed the bulletin. |
| context | Object[] | Collection of data about departments/groups. |
| id | String | The id of department/group. |
| draft | Logical | True = the bulletin is just a draft. |
| from | Date | From when the bulletin is active. |
| id | Integer | The id of the bulletin. |
| preview | String | A part of the bulletin. |
| title | String | The title of the bulletin |
| to | Date | End date |
| type | Integer | To whom the bulletin is addressed(0=Default, 1=Copmany, 2=Department, 3=Group). |
messageoptional | Object | Object containing response messages. |
| code | Number | Message code. |
| text | String | Message text. |
| type | String | Type of message. "warning""info" |
Success example
HTTP/1.1 200 OK{"response": {"data": {"bulletins": [{"id": 2163334180,"title": " Bulletin 1","type": 2,"from": "2019-01-01","to": "2019-05-12","draft": false,"preview": "The...","body": "The first bulletin.","context": [{"id": "MFA_AND"}]"changed": "2019-02-14","changedBy": "MVE"}]},"errorCode": 0,"errorMessage": ""}}
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. |