Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Create a notice

Description

Creates a new notice.

Package Details

Interface

INoticeManager

Syntax

await NoticeManager.Create(NoticeDTO notice);

Returns

Task<Notice>

API

POST
/api/v1/notices

Parameters

Parameter

Description

Parameter Type

Notice

Notice object

request body

Sample request body

{
    "Services": [
            11    
    ],
    "EnglishHeaderText": "string",
    "FrenchHeaderText": "string",
    "EnglishBodyText": "string",
    "FrenchBodyText": "string",
    "StartDate": "2020-10-19",
    "EndDate": "2020-10-19"
}

Returns

200 OK - Notice

Example

var notice = new NoticeDTO
{    
    Services = new List<int> {2, 7, 11},
    EnglishHeaderText = "header text en",
    FrenchHeaderText = "header text fr",
    EnglishBodyText = "english body en",
    FrenchBodyText = "french body text",
    StartDate = DateTime.Now, 
    EndDate = DateTime.Now.AddDays(5)
};

var notice = await _noticeManager.Create(notice);
  • No labels