Hmx Accounts

<back to all web services

CreatePurchaseOrder

The following routes are available for this service:
POST/api/purchaseordersCreate a new PurchaseOrder
CreatePurchaseOrder Parameters:
NameParameterData TypeRequiredDescription
UserIdbodystringNo
UserEmailbodystringNo
CreatedDatebodyDateTimeNo
VoidbodyboolNo
CouponCodebodystringNo
OrderItemsbodyList<PurchaseOrderItemDto>No
PaymentTypebodystringNo
BillingInformationDtobodyBillingInformationDtoNo
PurchaseOrderItemDto Parameters:
NameParameterData TypeRequiredDescription
IdformintNo
PurchaseOrderIdformintNo
ProductIdformstringNo
ProductNameformstringNo
QuantityformintNo
PriceformdecimalNo
DiscountDescriptionformstringNo
DiscountSourceformstringNo
DiscountformdecimalNo
CreatedDateformDateTimeNo
BillingInformationDto Parameters:
NameParameterData TypeRequiredDescription
CardNumberformstringNo
CardTypeformstringNo
ExpireMonthformintNo
ExpireYearformintNo
Cvv2formstringNo
FirstNameformstringNo
LastNameformstringNo
CityformstringNo
CountryCodeformstringNo
Line1formstringNo
PostalCodeformstringNo
StateformstringNo
CreatePurchaseOrderResponse Parameters:
NameParameterData TypeRequiredDescription
MessageformstringNo
StatusformHttpStatusCodeNo
PurchaseOrderformPurchaseOrderDtoNo
DetailsformList<Details>No
PurchaseOrderDto Parameters:
NameParameterData TypeRequiredDescription
IdformintNo
UserIdformstringNo
CreatedDateformDateTimeNo
PaymentTypeformstringNo
VoidformboolNo
PaidformboolNo
TransactionIdentifierformstringNo
CouponCodeformstringNo
OrderItemsformList<PurchaseOrderItem>No
PayerformstringNo
BillingAddressLine1formstringNo
BillingAddressCityformstringNo
BillingAddressStateformstringNo
BillingAddressPostalCodeformstringNo
BillingAddressCountryCodeformstringNo
PurchaseOrderItem Parameters:
NameParameterData TypeRequiredDescription
IdformintNo
PurchaseOrderIdformintNo
ProductIdformstringNo
ProductNameformstringNo
QuantityformintNo
PriceformdecimalNo
DiscountDescriptionformstringNo
DiscountSourceformstringNo
DiscountformdecimalNo
CreatedDateformDateTimeNo
Details Parameters:
NameParameterData TypeRequiredDescription
CodeformstringNo
FieldformstringNo
IssueformstringNo

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 /api/purchaseorders HTTP/1.1 
Host: accounts.dev.healthmonix.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	userId: String,
	userEmail: String,
	createdDate: 0001-01-01,
	void: False,
	couponCode: String,
	orderItems: 
	[
		{
			id: 0,
			purchaseOrderId: 0,
			productId: String,
			productName: String,
			quantity: 0,
			price: 0,
			discountDescription: String,
			discountSource: String,
			discount: 0,
			createdDate: 0001-01-01
		}
	],
	paymentType: String,
	billingInformationDto: 
	{
		cardNumber: String,
		cardType: String,
		expireMonth: 0,
		expireYear: 0,
		cvv2: String,
		firstName: String,
		lastName: String,
		city: String,
		countryCode: String,
		line1: String,
		postalCode: String,
		state: String
	}
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	message: String,
	status: Continue,
	purchaseOrder: 
	{
		id: 0,
		userId: String,
		createdDate: 0001-01-01,
		paymentType: String,
		void: False,
		paid: False,
		transactionIdentifier: String,
		couponCode: String,
		orderItems: 
		[
			{
				id: 0,
				purchaseOrderId: 0,
				productId: String,
				productName: String,
				quantity: 0,
				price: 0,
				discountDescription: String,
				discountSource: String,
				discount: 0,
				createdDate: 0001-01-01
			}
		],
		payer: String,
		billingAddressLine1: String,
		billingAddressCity: String,
		billingAddressState: String,
		billingAddressPostalCode: String,
		billingAddressCountryCode: String
	},
	details: 
	[
		{
			code: String,
			field: String,
			issue: String
		}
	]
}