YM REST Services

<back to all web services

Dues

Requires Authentication
Requires any of the roles:admin, oauthadminRequired permission:CanAdminMembers
The following routes are available for this service:
POST/Ams/{ClientID}/DuesCreate a Dues invoice.
Dues Parameters:
NameParameterData TypeRequiredDescription
transactionIdbodyintNo
IsTaxExemptbodyboolNo
DescriptionbodystringNo
AmountbodydoubleNo
MembershipbodyMembershipNo
RulesbodyDuesRulesResponseNo
invoicebodyInvoiceNo
DuesPromoCodebodystringNo
BaseDto Parameters:
NameParameterData TypeRequiredDescription
UsingRedisformboolNo
AppInitTimeformDateTimeNo
ServerIDformstringNo
BaseSharedDto Parameters:
NameParameterData TypeRequiredDescription
ClientIDformintNo
ResponseStatusformResponseStatusNo
BypassCacheformboolNo
DateCachedformDateTimeNo
DeviceformDeviceNo
Membership Parameters:
NameParameterData TypeRequiredDescription
IdformintNo
CodeformstringNo
NameformstringNo
DuesAmountformdoubleNo
ProRatedDuesformboolNo
ProRateFactorformdoubleNo
AllowMultipleOpenInvoicesformboolNo
DuesRulesResponse Parameters:
NameParameterData TypeRequiredDescription
RulesformList<DuesRule>No
DuesRules Parameters:
NameParameterData TypeRequiredDescription
MemberIDformintNo
MembershipIDformintNo
DuesRule Parameters:
NameParameterData TypeRequiredDescription
IDformintNo
NameformstringNo
DescriptionformstringNo
AmountformdoubleNo
SelectedformboolNo
Invoice Parameters:
NameParameterData TypeRequiredDescription
dateformDateTimeNo
shippingMethodIdformintNo
shippingMethodNameformstringNo
shippingTaxformdoubleNo
shippingTotalformdoubleNo
taxRateformdoubleNo
taxTotalformdoubleNo
totalAmountformdoubleNo
commentformstringNo
personformPersonNo
shippingAddressformAddressNo
invoiceItemsformList<InvoiceItem>No
isNewMemberformboolNo
taxGLCodeformstringNo
taxQBClassformstringNo
shippingGLCodeformstringNo
shippingQBClassformstringNo
Person Parameters:
NameParameterData TypeRequiredDescription
idformintNo
organizationformstringNo
firstNameformstringNo
lastNameformstringNo
middleNameformstringNo
nameSuffixformstringNo
emailAddressformstringNo
primaryAddressformAddressNo
usernameformstringNo
passwordformstringNo
isMemberformboolNo
expirationDateformstringNo
currentMembershipAllowsMultipleOpenInvoicesformboolNo
currentMembershipInvoiceIsOpenformboolNo
currentMembershipInvoiceAwaitingAutoBillformboolNo
Address Parameters:
NameParameterData TypeRequiredDescription
firstNameformstringNo
lastNameformstringNo
organizationformstringNo
address1formstringNo
address2formstringNo
cityformstringNo
locationformstringNo
postalCodeformstringNo
countryCodeformstringNo
countryNameformstringNo
areaCodeformstringNo
phoneformstringNo
InvoiceItem Parameters:
NameParameterData TypeRequiredDescription
itemTypeIdformstringNo
idformintNo
shippingCostformdoubleNo
descriptionformstringNo
customDescriptionformstringNo
taxRateformdoubleNo
taxGLCodeformstringNo
quantityformdoubleNo
amountformdoubleNo
isProRatedformboolNo
GLCodeformstringNo
isModifierformboolNo
isDuesRuleformboolNo
taxQBClassformstringNo
QBClassformstringNo
skuformstringNo
taxableformboolNo
autoPromoCodeAmountformdoubleNo
autoPromoCodeTitleformstringNo
salesDiscountformdoubleNo
DuesResponse Parameters:
NameParameterData TypeRequiredDescription
invoiceGuidformstringNo

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

{
	transactionId: 0,
	IsTaxExempt: False,
	Description: String,
	Amount: 0,
	Membership: 
	{
		Id: 0,
		Code: String,
		Name: String,
		DuesAmount: 0,
		ProRatedDues: False,
		ProRateFactor: 0,
		AllowMultipleOpenInvoices: False
	},
	Rules: 
	{
		Rules: 
		[
			{
				ID: 0,
				Name: String,
				Description: String,
				Amount: 0,
				Selected: False
			}
		],
		MemberID: 0,
		MembershipID: 0,
		UsingRedis: True,
		AppInitTime: 2024-05-03T02:24:13.1616448-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-03T02:25:34.2660313-04:00,
		Device: Desktop
	},
	invoice: 
	{
		date: 0001-01-01,
		shippingMethodId: 0,
		shippingMethodName: String,
		shippingTax: 0,
		shippingTotal: 0,
		taxRate: 0,
		taxTotal: 0,
		totalAmount: 0,
		comment: String,
		person: 
		{
			id: 0,
			organization: String,
			firstName: String,
			lastName: String,
			middleName: String,
			nameSuffix: String,
			emailAddress: String,
			primaryAddress: 
			{
				firstName: String,
				lastName: String,
				organization: String,
				address1: String,
				address2: String,
				city: String,
				location: String,
				postalCode: String,
				countryCode: String,
				countryName: String,
				areaCode: String,
				phone: String
			},
			username: String,
			password: String,
			isMember: False,
			expirationDate: String,
			currentMembershipAllowsMultipleOpenInvoices: False,
			currentMembershipInvoiceIsOpen: False,
			currentMembershipInvoiceAwaitingAutoBill: False,
			UsingRedis: True,
			AppInitTime: 2024-05-03T02:24:13.1616448-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-03T02:25:34.2831838-04:00,
			Device: Desktop
		},
		shippingAddress: 
		{
			firstName: String,
			lastName: String,
			organization: String,
			address1: String,
			address2: String,
			city: String,
			location: String,
			postalCode: String,
			countryCode: String,
			countryName: String,
			areaCode: String,
			phone: String
		},
		invoiceItems: 
		[
			{
				itemTypeId: String,
				id: 0,
				shippingCost: 0,
				description: String,
				customDescription: String,
				taxRate: 0,
				taxGLCode: String,
				quantity: 0,
				amount: 0,
				isProRated: False,
				GLCode: String,
				isModifier: False,
				isDuesRule: False,
				taxQBClass: String,
				QBClass: String,
				sku: String,
				taxable: False,
				autoPromoCodeAmount: 0,
				autoPromoCodeTitle: String,
				salesDiscount: 0
			}
		],
		isNewMember: False,
		taxGLCode: String,
		taxQBClass: String,
		shippingGLCode: String,
		shippingQBClass: String
	},
	DuesPromoCode: String,
	UsingRedis: True,
	AppInitTime: 2024-05-03T02:24:13.1616448-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-03T02:25:34.2871884-04:00,
	Device: Desktop
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	invoiceGuid: String,
	transactionId: 0,
	IsTaxExempt: False,
	Description: String,
	Amount: 0,
	Membership: 
	{
		Id: 0,
		Code: String,
		Name: String,
		DuesAmount: 0,
		ProRatedDues: False,
		ProRateFactor: 0,
		AllowMultipleOpenInvoices: False
	},
	Rules: 
	{
		Rules: 
		[
			{
				ID: 0,
				Name: String,
				Description: String,
				Amount: 0,
				Selected: False
			}
		],
		MemberID: 0,
		MembershipID: 0,
		UsingRedis: True,
		AppInitTime: 2024-05-03T02:24:13.1616448-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-03T02:25:34.2923961-04:00,
		Device: Desktop
	},
	invoice: 
	{
		date: 0001-01-01,
		shippingMethodId: 0,
		shippingMethodName: String,
		shippingTax: 0,
		shippingTotal: 0,
		taxRate: 0,
		taxTotal: 0,
		totalAmount: 0,
		comment: String,
		person: 
		{
			id: 0,
			organization: String,
			firstName: String,
			lastName: String,
			middleName: String,
			nameSuffix: String,
			emailAddress: String,
			primaryAddress: 
			{
				firstName: String,
				lastName: String,
				organization: String,
				address1: String,
				address2: String,
				city: String,
				location: String,
				postalCode: String,
				countryCode: String,
				countryName: String,
				areaCode: String,
				phone: String
			},
			username: String,
			password: String,
			isMember: False,
			expirationDate: String,
			currentMembershipAllowsMultipleOpenInvoices: False,
			currentMembershipInvoiceIsOpen: False,
			currentMembershipInvoiceAwaitingAutoBill: False,
			UsingRedis: True,
			AppInitTime: 2024-05-03T02:24:13.1616448-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-03T02:25:34.2923961-04:00,
			Device: Desktop
		},
		shippingAddress: 
		{
			firstName: String,
			lastName: String,
			organization: String,
			address1: String,
			address2: String,
			city: String,
			location: String,
			postalCode: String,
			countryCode: String,
			countryName: String,
			areaCode: String,
			phone: String
		},
		invoiceItems: 
		[
			{
				itemTypeId: String,
				id: 0,
				shippingCost: 0,
				description: String,
				customDescription: String,
				taxRate: 0,
				taxGLCode: String,
				quantity: 0,
				amount: 0,
				isProRated: False,
				GLCode: String,
				isModifier: False,
				isDuesRule: False,
				taxQBClass: String,
				QBClass: String,
				sku: String,
				taxable: False,
				autoPromoCodeAmount: 0,
				autoPromoCodeTitle: String,
				salesDiscount: 0
			}
		],
		isNewMember: False,
		taxGLCode: String,
		taxQBClass: String,
		shippingGLCode: String,
		shippingQBClass: String
	},
	DuesPromoCode: String,
	UsingRedis: True,
	AppInitTime: 2024-05-03T02:24:13.1616448-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-03T02:25:34.2923961-04:00,
	Device: Desktop
}