YM REST Services

<back to all web services

ProductsDto

The following routes are available for this service:
POST/Ams/{ClientID}/ProductsCreate Store Product.
PUT/Ams/{ClientID}/ProductsUpdate Store Product.
ProductsDto Parameters:
NameParameterData TypeRequiredDescription
ProductIDbodyintNo
DetailsbodyProductDetailsNo
DisplayOptionsbodyProductDisplayOptionsNo
ItemOptionsbodyItemOptionsNo
PricingOptionsbodyPricingNo
FinancialbodyFinancialNo
BaseDto Parameters:
NameParameterData TypeRequiredDescription
UsingRedisformboolNo
AppInitTimeformDateTimeNo
ServerIDformstringNo
BaseSharedDto Parameters:
NameParameterData TypeRequiredDescription
ClientIDformintNo
ResponseStatusformResponseStatusNo
BypassCacheformboolNo
DateCachedformDateTimeNo
DeviceformDeviceNo
ProductDetails Parameters:
NameParameterData TypeRequiredDescription
ProductNameformstringNo
ProductCodeformstringNo
ProductActiveformboolNo
PrimaryCategoryformstringNo
ProductDescriptionformstringNo
ProductTypeformintNo
ProductDisplayOptions Parameters:
NameParameterData TypeRequiredDescription
IsFeaturedformboolNo
ListInStoreformboolNo
TagLineformstringNo
ProductGroupformstringNo
ItemOptions Parameters:
NameParameterData TypeRequiredDescription
RequireCustomerResponseformboolNo
SpecialInstructionsformstringNo
SizeTypeformstringNo
ColorOptionsformstringNo
CustomFieldNameformstringNo
CustomFieldOptionsformstringNo
Pricing Parameters:
NameParameterData TypeRequiredDescription
ChargeTaxVATformboolNo
ShippingWeightformdoubleNo
ShippingSurchargeformdecimalNo
NonMemberUnitPriceformdecimal?No
MemberPricingformList<MemberPricing>No
MemberPricing Parameters:
NameParameterData TypeRequiredDescription
MemberTypeCodeformstringNo
UnitPriceformdecimal?No
Financial Parameters:
NameParameterData TypeRequiredDescription
GLCodeformstringNo
QuickBooksClassformstringNo
ProductsDto Parameters:
NameParameterData TypeRequiredDescription
ProductIDbodyintNo
DetailsbodyProductDetailsNo
DisplayOptionsbodyProductDisplayOptionsNo
ItemOptionsbodyItemOptionsNo
PricingOptionsbodyPricingNo
FinancialbodyFinancialNo

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

{
	ProductID: 0,
	Details: 
	{
		ProductName: String,
		ProductCode: String,
		ProductActive: False,
		PrimaryCategory: String,
		ProductDescription: String,
		ProductType: 0
	},
	DisplayOptions: 
	{
		IsFeatured: False,
		ListInStore: False,
		TagLine: String,
		ProductGroup: String
	},
	ItemOptions: 
	{
		RequireCustomerResponse: False,
		SpecialInstructions: String,
		SizeType: String,
		ColorOptions: String,
		CustomFieldName: String,
		CustomFieldOptions: String
	},
	PricingOptions: 
	{
		ChargeTaxVAT: False,
		ShippingWeight: 0,
		ShippingSurcharge: 0,
		NonMemberUnitPrice: 0,
		MemberPricing: 
		[
			{
				MemberTypeCode: String,
				UnitPrice: 0
			}
		]
	},
	Financial: 
	{
		GLCode: String,
		QuickBooksClass: String
	},
	UsingRedis: True,
	AppInitTime: 2024-05-03T00:25:28.2378460-04:00,
	ServerID: WS-6-183-431,
	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-03T01:04:17.4133170-04:00,
	Device: Desktop
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	ProductID: 0,
	Details: 
	{
		ProductName: String,
		ProductCode: String,
		ProductActive: False,
		PrimaryCategory: String,
		ProductDescription: String,
		ProductType: 0
	},
	DisplayOptions: 
	{
		IsFeatured: False,
		ListInStore: False,
		TagLine: String,
		ProductGroup: String
	},
	ItemOptions: 
	{
		RequireCustomerResponse: False,
		SpecialInstructions: String,
		SizeType: String,
		ColorOptions: String,
		CustomFieldName: String,
		CustomFieldOptions: String
	},
	PricingOptions: 
	{
		ChargeTaxVAT: False,
		ShippingWeight: 0,
		ShippingSurcharge: 0,
		NonMemberUnitPrice: 0,
		MemberPricing: 
		[
			{
				MemberTypeCode: String,
				UnitPrice: 0
			}
		]
	},
	Financial: 
	{
		GLCode: String,
		QuickBooksClass: String
	},
	UsingRedis: True,
	AppInitTime: 2024-05-03T00:25:28.2378460-04:00,
	ServerID: WS-6-183-431,
	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-03T01:04:17.4133170-04:00,
	Device: Desktop
}