Bulletins - Get a bulletin by id.

API Url

Use it for returning a bulletin.

GET
http://localhost:16010/ProMarkREST/rest/Bulletins/bulletins/{id}

Permissions: user

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.

        descString

Description of department/group.

        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=Company, 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": 2163334059,
"title": " Bulletin 1",
"type": 2,
"from": "2019-01-01",
"to": "2019-05-12",
"draft": false,
"preview": "The...",
"body": "The first bulletin.",
"changed": "2019-02-14",
"changedBy": "MVE",
"context": [
{
"id": "MFA_AND",
"desc": "Warehouse Transport & Spedition"
}
]
}
]
},
"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.

Error example:

HTTP/1.1 404 Not found
{
"response": {
"data": {},
"errorCode": 104,
"errorMessage": "Bulletin doesn't exist."
}
}