YM REST Services

<back to all web services

CampaignEmailLists

Requires Authentication
Requires any of the roles:admin, oauthadmin
The following routes are available for this service:
GET/Ams/{ClientID}/CampaignEmailListsReturn the CampaignEmailLists data.
GET/Ams/{ClientID}/CampaignEmailLists/{ListId}Return the CampaignEmailList details and records.
PUT/Ams/{ClientID}/CampaignEmailLists/{ListId}Update the CampaignEmailList.
DELETE/Ams/{ClientID}/CampaignEmailLists/{ListId}Delete the CampaignEmailList for a given List ID.
DELETE/Ams/{ClientID}/CampaignEmailLists/{ListId}/ListRecipientId/{ListRecipientId}Delete a Recipient in the CampaignEmailList for a given List ID.
CampaignEmailLists Parameters:
NameParameterData TypeRequiredDescription
ListTypebodyEmailListTypeNo
ListIdpathintNo
ListRecipientIdpathlongNo
CategoryIdbodyintNo
StatusIdbodyEmailStatusNo
ListNamebodystringNo
PageSizebodyintNo
PageNumberbodyintNo
IsForceReloadbodyboolNo
OrderBybodystringNo
OrderByDirectionbodystringNo
BaseDto Parameters:
NameParameterData TypeRequiredDescription
UsingRedisformboolNo
AppInitTimeformDateTimeNo
ServerIDformstringNo
BaseSharedDto Parameters:
NameParameterData TypeRequiredDescription
ClientIDformintNo
ResponseStatusformResponseStatusNo
BypassCacheformboolNo
DateCachedformDateTimeNo
DeviceformDeviceNo
CampaignEmailListsResponse Parameters:
NameParameterData TypeRequiredDescription
ListCountformintNo
CampaignEmailListDetailformCampaignEmailListDetailNo
CampaignEmailListsformList<CampaignEmailList>No
ListReLoadStatusformCampaignListReloadStatusNo
CampaignEmailListDetail Parameters:
NameParameterData TypeRequiredDescription
TotalCountformintNo
TotalToSendformintNo
ComplaintsformintNo
HardBouncesformintNo
GlobalOptoutsformintNo
CategoryOptoutsformintNo
CampaignEmailListItemsformList<CampaignEmailListItem>No
CampaignEmailList Parameters:
NameParameterData TypeRequiredDescription
ListIdformintNo
ListTypeformEmailListTypeNo
ListSizeformintNo
ListNameformstringNo
ListAreaformEmailListAreaNo
DateCreatedformDateTimeNo
DateModifiedformDateTimeNo
DateLastUpdatedformDateTimeNo
HumanQueryformstringNo
CampaignEmailListItem Parameters:
NameParameterData TypeRequiredDescription
IdformlongNo
MemberIdformintNo
FirstNameformstringNo
LastNameformstringNo
EmailformstringNo
CounrtyDialCodeformstringNo
AreaCodeformstringNo
MobileformstringNo
EmailStatusformEmailStatusNo

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.

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

{
	ListType: None,
	ListId: 0,
	ListRecipientId: 0,
	CategoryId: 0,
	StatusId: None,
	ListName: String,
	PageSize: 0,
	PageNumber: 0,
	IsForceReload: False,
	OrderBy: String,
	OrderByDirection: String,
	UsingRedis: True,
	AppInitTime: 2024-05-03T09:24:49.0490081-04:00,
	ServerID: WS-4-69-031,
	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:07:54.3693032-04:00,
	Device: Desktop
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	ListCount: 0,
	CampaignEmailListDetail: 
	{
		TotalCount: 0,
		TotalToSend: 0,
		Complaints: 0,
		HardBounces: 0,
		GlobalOptouts: 0,
		CategoryOptouts: 0,
		CampaignEmailListItems: 
		[
			{
				Id: 0,
				MemberId: 0,
				FirstName: String,
				LastName: String,
				Email: String,
				CounrtyDialCode: String,
				AreaCode: String,
				Mobile: String,
				EmailStatus: None
			}
		],
		ListId: 0,
		ListType: None,
		ListSize: 0,
		ListName: String,
		ListArea: None,
		DateCreated: 0001-01-01,
		DateModified: 0001-01-01,
		DateLastUpdated: 0001-01-01,
		HumanQuery: String
	},
	CampaignEmailLists: 
	[
		{
			ListId: 0,
			ListType: None,
			ListSize: 0,
			ListName: String,
			ListArea: None,
			DateCreated: 0001-01-01,
			DateModified: 0001-01-01,
			DateLastUpdated: 0001-01-01,
			HumanQuery: String
		}
	],
	ListReLoadStatus: None,
	ListType: None,
	ListId: 0,
	ListRecipientId: 0,
	CategoryId: 0,
	StatusId: None,
	ListName: String,
	PageSize: 0,
	PageNumber: 0,
	IsForceReload: False,
	OrderBy: String,
	OrderByDirection: String,
	UsingRedis: True,
	AppInitTime: 2024-05-03T09:24:49.0490081-04:00,
	ServerID: WS-4-69-031,
	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:07:54.3693032-04:00,
	Device: Desktop
}