Bulletins - Insert a bulletin board.

API Url

Use it for inserting a bulletin board.

POST
http://localhost:16010/ProMarkREST/rest/Bulletins/bulletins

Permissions: user

Parameter

FieldTypeDescription
requestObject

Main object containing the request data.

  dataObject

Object containg data to be uploaded.

    bulletinsObject[]

Collection of bulletins.

      bodyString

The content of the bulletin.

      contextObject[]

Collection of data about departments/groups.

        idString

The id of department/group.

      draftLogical

True = the bulletin is just a draft.

      fromDate

From when the bulletin is active.

      previewString

A part of the bulletin.

      titleString

The title of the bulletin

      toDate

End date

      typeInteger

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

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data.

    bulletinsObject[]

Collection of bulletins.

      bodyString

The content of the bulletin.

      changedDate

The date when the bulletin was last time changed.

      changedByString

The id of the user who last changed the bulletin.

      contextObject[]

Collection of data about departments/groups.

        idString

The id of department/group.

      draftLogical

True = the bulletin is just a draft.

      fromDate

From when the bulletin is active.

      idInteger

The id of the bulletin.

      previewString

A part of the bulletin.

      titleString

The title of the bulletin

      toDate

End date

      typeInteger

To whom the bulletin is addressed(0=Default, 1=Copmany, 2=Department, 3=Group).

  messageoptionalObject

Object containing response messages.

    codeNumber

Message code.

    textString

Message text.

    typeString

Type of message.

Allowed values:"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

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data (empty).

  errorCodeNumber

Error code.

  errorMessageString

Error description.