YM REST Services

<back to all web services

Groups

Requires Authentication
Requires any of the roles:admin, oauthadmin
The following routes are available for this service:
GET/Ams/{ClientID}/GroupsReturn a list of Groups for a Client.
POST/Ams/{ClientID}/GroupsCreate a Group and return the newly created GroupID.
PUT/Ams/{ClientID}/GroupsUpdate an existing Group.Omitted fields will be ignored.
Groups Parameters:
NameParameterData TypeRequiredDescription
GroupIDbodyint?No
GroupCodebodystringNo
TypeIDbodyint?No
NamebodystringNo
Activebodybool?No
Hiddenbodybool?No
Accessibilitybodyint?No
Membershipbodyint?No
Messagingbodyint?No
SendNewsletterbodybool?No
EnableFeedbodybool?No
AdminCanExportMembersbodybool?No
PhotoApprovalbodybool?No
EmailOptionsAdminbodyint?No
EmailOptionsMemberbodyint?No
ShortDescriptionbodystringNo
WelcomeContentbodystringNo
BaseDto Parameters:
NameParameterData TypeRequiredDescription
UsingRedisformboolNo
AppInitTimeformDateTimeNo
ServerIDformstringNo
BaseSharedDto Parameters:
NameParameterData TypeRequiredDescription
ClientIDformintNo
ResponseStatusformResponseStatusNo
BypassCacheformboolNo
DateCachedformDateTimeNo
DeviceformDeviceNo
GroupsResponse Parameters:
NameParameterData TypeRequiredDescription
GroupTypeListformList<GroupType>No
GroupType Parameters:
NameParameterData TypeRequiredDescription
IdformintNo
TypeNameformstringNo
SortIndexformdouble?No
GroupsformList<Group>No
Group Parameters:
NameParameterData TypeRequiredDescription
IdformintNo
NameformstringNo
StatusformStatus?No
JoinOptionformJoinOption?No

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}/Groups HTTP/1.1 
Host: ws.yourmembership.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	GroupID: 0,
	GroupCode: String,
	TypeID: 0,
	Name: String,
	Active: False,
	Hidden: False,
	Accessibility: 0,
	Membership: 0,
	Messaging: 0,
	SendNewsletter: False,
	EnableFeed: False,
	AdminCanExportMembers: False,
	PhotoApproval: False,
	EmailOptionsAdmin: 0,
	EmailOptionsMember: 0,
	ShortDescription: String,
	WelcomeContent: String,
	UsingRedis: True,
	AppInitTime: 2024-05-03T10:15:45.4274162-04:00,
	ServerID: WS-5-156-355,
	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-03T10:39:46.7277095-04:00,
	Device: Desktop
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	GroupTypeList: 
	[
		{
			Id: 0,
			TypeName: String,
			SortIndex: 0,
			Groups: 
			[
				{
					Id: 0,
					Name: String,
					Status: None,
					JoinOption: CanJoin
				}
			]
		}
	],
	GroupID: 0,
	GroupCode: String,
	TypeID: 0,
	Name: String,
	Active: False,
	Hidden: False,
	Accessibility: 0,
	Membership: 0,
	Messaging: 0,
	SendNewsletter: False,
	EnableFeed: False,
	AdminCanExportMembers: False,
	PhotoApproval: False,
	EmailOptionsAdmin: 0,
	EmailOptionsMember: 0,
	ShortDescription: String,
	WelcomeContent: String,
	UsingRedis: True,
	AppInitTime: 2024-05-03T10:15:45.4274162-04:00,
	ServerID: WS-5-156-355,
	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-03T10:39:46.7436917-04:00,
	Device: Desktop
}