YM REST Services

<back to all web services

Announcements

Requires Authentication
Requires any of the roles:admin, oauthadmin, member, oauthmember, admin, oauthadmin, admin, oauthadmin, admin, oauthadmin
The following routes are available for this service:
GET/Ams/{ClientID}/AnnouncementsReturn a list of announcements for the admin.
POST/Ams/{ClientID}/AnnouncementsAdd a new admin announcement.
PUT/Ams/{ClientID}/AnnouncementsSort the existing announcements based on the order the IDs are passed.
GET/Ams/{ClientID}/Member/{MemberID}/AnnouncementsReturn a list of announcements for the member.
PUT/Ams/{ClientID}/Announcements/{AnnouncementId}Update an admin announcement details.
DELETE/Ams/{ClientID}/Announcements/{AnnouncementId}Delete an admin announcement.
Announcements Parameters:
NameParameterData TypeRequiredDescription
AnnouncementIdpathintNo
AnnouncementIdsbodyList<int>No
TitlebodystringNo
AnnouncementTextbodystringNo
ActionTextbodystringNo
ActionUrlbodystringNo
ActionInNewTabbodyboolNo
ActivebodyboolNo
StartDatebodyDateTimeNo
ExpireDatebodyDateTimeNo
MemberBaseSharedDto Parameters:
NameParameterData TypeRequiredDescription
MemberIDformintNo
BaseSharedDto Parameters:
NameParameterData TypeRequiredDescription
ClientIDformintNo
ResponseStatusformResponseStatusNo
BypassCacheformboolNo
DateCachedformDateTimeNo
DeviceformDeviceNo
AnnouncementsResponse Parameters:
NameParameterData TypeRequiredDescription
AnnouncementListformList<Announcement>No
Announcement Parameters:
NameParameterData TypeRequiredDescription
AnnouncementIdformintNo
TitleformstringNo
AnnouncementTextformstringNo
ActionTextformstringNo
ActionUrlformstringNo
ActionInNewTabformboolNo
ActiveformboolNo
StartDateformDateTimeNo
ExpireDateformDateTimeNo
ModifiedDateformDateTimeNo
IsSystemGeneratedformboolNo

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /Ams/{ClientID}/Announcements HTTP/1.1 
Host: ws.yourmembership.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	AnnouncementId: 0,
	AnnouncementIds: 
	[
		0
	],
	Title: String,
	AnnouncementText: String,
	ActionText: String,
	ActionUrl: String,
	ActionInNewTab: False,
	Active: False,
	StartDate: 0001-01-01,
	ExpireDate: 0001-01-01,
	MemberID: 0,
	ClientID: 0,
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	},
	BypassCache: False,
	DateCached: 2024-05-03T06:11:53.7720355-04:00,
	Device: Desktop
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	AnnouncementList: 
	[
		{
			AnnouncementId: 0,
			Title: String,
			AnnouncementText: String,
			ActionText: String,
			ActionUrl: String,
			ActionInNewTab: False,
			Active: False,
			StartDate: 0001-01-01,
			ExpireDate: 0001-01-01,
			ModifiedDate: 0001-01-01,
			IsSystemGenerated: False
		}
	],
	AnnouncementId: 0,
	AnnouncementIds: 
	[
		0
	],
	Title: String,
	AnnouncementText: String,
	ActionText: String,
	ActionUrl: String,
	ActionInNewTab: False,
	Active: False,
	StartDate: 0001-01-01,
	ExpireDate: 0001-01-01,
	MemberID: 0,
	ClientID: 0,
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	},
	BypassCache: False,
	DateCached: 2024-05-03T06:11:53.7720355-04:00,
	Device: Desktop
}